CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug Reports on this forum. Send them to support@ccsinfo.com

[SOLVED]How to use glcd data pin from pin8 to pin15 ?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
borseyogesh1436



Joined: 30 Nov 2017
Posts: 21

View user's profile Send private message

PostPosted: Wed Jan 03, 2018 10:45 pm     Reply with quote

I don't have pdf of HG12864B which i am using.
I search on net but not find rst pin current specification in any PDF.

Saying that code with DSPIC30f6014A
and it will display nothing when rst is connected with PIN_D7.

And it will display attached image when RST is connected with 5V.

https://drive.google.com/file/d/1m_R_W9tkH-DegwWMNN-rnkpeRqn-yCwZ/view?usp=sharing
Ttelmah



Joined: 11 Mar 2010
Posts: 12622

View user's profile Send private message

PostPosted: Thu Jan 04, 2018 1:47 am     Reply with quote

Actually it's well specified.

You just have to look for the chip data sheet (the KS0107 & 0108, which form the core of the system).

Your problem is how can the PIC ever raise the pin high enough?. Your old PIC supported operation to 5v. The new chip supports 4v _max_.... The RSTB line is four loads (it feeds all four KS0108 chips in parallel), and needs to go up to 3.5v to be seen as high.
You have a signalling voltage problem.
borseyogesh1436



Joined: 30 Nov 2017
Posts: 21

View user's profile Send private message

PostPosted: Thu Jan 04, 2018 2:24 am     Reply with quote

I don't think that's supply problem because its working with same voltage with other compiler that's working fine.
Ttelmah



Joined: 11 Mar 2010
Posts: 12622

View user's profile Send private message

PostPosted: Thu Jan 04, 2018 4:36 am     Reply with quote

Er. You talk about taking the signal to 5v. You do realise this is a 3.3v PIC?. The other PIC you talk about is rated to operate up to 5v. This one is not.
Now the data sheet for the GLCD controller chip says that the RST signal needs to go up to 3.5v to be seen as 'high'. This PIC is never going to take the signal up to 5v.Maximum operating voltage is 3.6v. It has inputs that will accept signals up to 5v, but it's outputs are 3.3v only.
borseyogesh1436



Joined: 30 Nov 2017
Posts: 21

View user's profile Send private message

PostPosted: Thu Jan 04, 2018 4:46 am     Reply with quote

Thanks for helping friends
the problem is solved,
i forget to use read = PORTD and write =LATD
with DSPIC30f6014A
code is working

Code:
#BYTE PORTDH=getenv("SFR:PORTD")+1
#BYTE LATDH=getenv("SFR:LATD")+1
#BYTE TRISDH=getenv("SFR:TRISD")+1

void glcd_writeByte(int1 side, int8 data)
{ TRISDH=0x00;
   if(side)                   // Choose which side to write to
      output_high(GLCD_CS2);
   else
      output_high(GLCD_CS1);

   output_low(GLCD_RW);       // Set for writing
   LATDH=data;  //output_d(data);            // Put the data on the port
   delay_cycles(1);
   output_high(GLCD_E);       // Pulse the enable pin
   delay_cycles(5);
   output_low(GLCD_E);
   output_low(GLCD_CS1);      // Reset the chip select lines
   output_low(GLCD_CS2);
}

BYTE glcd_readByte(int1 side)
{
   int8 data;             // Stores the data read from the LCD
   
   TRISDH=0xFF;               // Set port d to input
   output_high(GLCD_RW);      // Set for reading

   if(side)                   // Choose which side to write to
   output_high(GLCD_CS2);
   else
   output_high(GLCD_CS1);

   delay_cycles(1);
   output_high(GLCD_E);       // Pulse the enable pin
   delay_cycles(4);
   data = PORTDH;        // Get the data from the display's output register
   output_low(GLCD_E);
   output_low(GLCD_CS1);      // Reset the chip select lines
   output_low(GLCD_CS2);
   return data;               // Return the read data
}


https://drive.google.com/file/d/1RFv7gzOzFys5jHUmlfODyHdE66yk-AFV/view?usp=sharing
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group