LCD Data on portA and portB
I am ICSP programming a board with a 16f73 and 14 pin lcd among other devices. For some weird reason the developer of the board,whom i do not know, has put D7, D6, D5, D4 of the LCD to PINS PORTA.0, PORTA.1, PORTA.2, PORTB.3 on the 16f73 repectivley. yes i said PORTB.3 not PORTA.3. Its seems that the pins for the LCD are connected in reverse and not all on the same port.
the last bit of information you should know is that there is a 256 eeprom chip connected serially to PORTB.1 AND PORTB.2.
thus far LCDOUT has been unsucessful
i have read tons of forums before posting
CAN ANY OF you invision a work around?
things to consider.
i would like to use the LCDOUT command
will using the eeprom to drive the LCD be an option? i.e load bytes from eeprom to the ports registers
can i somehow make portB.3 do exactly what portA.3 does?
'----------------------------------------the hardware\defs i have
E is portC.1
rs is portC.0
R/W is grounded (write mode)
Data0 to Data3 is not used
I am in HS mode
14 pin 2x8 lcd
define LCD_DREG PORTA
define LCD_DBIT 0
define LCD_RSREG PORTC
define LCD_RSBIT 0
DEFINE LCD_EREG PORTC
DEFINE LCD_EBIT 1
define LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
'holla
1 Attachment(s)
lcd data on port a and portb
yo thanks for the help guys. modifing the hardware is not an option because i am planning on upgrading a whole bunch of these boards with new code (1000+ boards)
dwayne- i think your on the right track as to what i need. i think that i should be able either:
2. to use four 1 byte variables (one byte for each data line on lcd) and output serially each byte at the same time
or
1. pick what bit holder in a byte to output on a specifed port.
i drew a picture of what my idea is. the main question is how the data should be strucuted. the data a drew is not exact its just to give you an idea of the structure.
remember that there is a 256byte eeprom on the board as well. this is only additional memory correct? my pic has built in memory. my best guess is that the eeprom was added to the design to hold the LCD data.
answer your own questions
well it sure is embarssing when you answer your own questions.
1. E is the "Clock" line
2. R/S tell the LCD whether the incomming data is intruction data or diplay data.
3. all display data is in ascii format.
A. initalization sequence before using the lcd.
B. i send the upper half (4 bits), make E go from high to low to high, send the lower half (4 bits), make the E go from high to low to high.
If any of these statements are wrong then please correct me. this is what i have gathered and not 100% on it all.