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 CCS Technical Support

GLCD driver and DSPIC

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Lemosek



Joined: 15 Oct 2011
Posts: 36

View user's profile Send private message

GLCD driver and DSPIC
PostPosted: Tue Jan 01, 2013 1:39 pm     Reply with quote

Hello,
I want connect GLCD to dsPic6010A but I don't known how.
At PIC18F I using HDM64GS12.c driver and works ok, but in dsPIC port is 16bit.
For example command
data = input_d(); // Get the data from the display's output register
reads all ports up 8 bit.

Is simple trick to solve this ??

Best regards
R.L.
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: GLCD driver and DSPIC
PostPosted: Wed Jan 02, 2013 3:41 am     Reply with quote

Lemosek wrote:
Hello,
I want connect GLCD to dsPic6010A but I don't known how.
At PIC18F I using HDM64GS12.c driver and works ok, but in dsPIC port is 16bit.
For example command
data = input_d(); // Get the data from the display's output register
reads all ports up 8 bit.

Is simple trick to solve this ??

Best regards
R.L.


It depends on your hardware configuration.

For example, if you have used the lower 8 bits of port D and data is defined as an int8 then no change is required.

If data is defined as int16 and you have used the lower 8 bits of port D then data = input_d() & 0xFF;
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Lemosek



Joined: 15 Oct 2011
Posts: 36

View user's profile Send private message

PostPosted: Wed Jan 02, 2013 4:29 am     Reply with quote

Hello, thanks for reply.
Ok i understand this. I write 16bit to 8bit variable so I write 8 LSB.
But when i use this command, I change direction of all pins at port.
So how I can use other pins at this port ?
This situation is also at command
Output_d = data.

Best regards
R.L.
Lemosek



Joined: 15 Oct 2011
Posts: 36

View user's profile Send private message

PostPosted: Thu Jan 03, 2013 4:56 pm     Reply with quote

Hello,
No one using dsPIC ??.
I think I must change data=input_d to
Code:

if(input(PIN_d0)) bit_set(data,0);
else
bit_clear(data,0);

etc...

But, I'm think over is this solution is to slow ??

Best regards
R.L.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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