View previous topic :: View next topic |
Author |
Message |
Lemosek
Joined: 15 Oct 2011 Posts: 36
|
GLCD driver and DSPIC |
Posted: Tue Jan 01, 2013 1:39 pm |
|
|
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
|
Re: GLCD driver and DSPIC |
Posted: Wed Jan 02, 2013 3:41 am |
|
|
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
|
|
Posted: Wed Jan 02, 2013 4:29 am |
|
|
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
|
|
Posted: Thu Jan 03, 2013 4:56 pm |
|
|
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. |
|
|
|