PDA

View Full Version : Splitting a byte?



Deadeye
- 29th May 2005, 13:19
OK im writing to a LCD using 8 bit mode.
It is a graphic LCD module.

anyway im using 6 outputs on PORTA and 2 on PORTB

HOW DO I DO THAT?

I was hopeing that this would work

PORTA = glcd_dat
PORTB.6 = PORTA.4
PORTB.5 = PORTA.5

but it doesnt.

please help

mister_e
- 29th May 2005, 14:48
what about your whole code? I hope you know that LCDOUT will not work for your Graphic LCD!!!

Darrel Taylor
- 29th May 2005, 18:41
Maybe you wanted something more like this...

PORTA = glcd_dat
PORTB.6 = glcd_dat.6
PORTB.5 = glcd_dat.7

Bit's 0-5 will go to PORTA. Bit's 6 and 7 will be ignored. Then 6 and 7 are copied to PORTB.

Darrel

Deadeye
- 29th May 2005, 21:58
thanks a bundle that worked.


Yes i know LCDOUT wont work. LOL. Thats why it took me 2 weeks to get this dam thing working.