http://www.geocities.com/SiliconVall.../lcd/intro.htm
if portb is wide open than just use 6 pins from that port to control the lcd.
PIC | LCD
-----------------------------
portb.0 to D4
portb.1 to D5
portb.2 to D6
portb.3 to D7
portb.4 to RS ' 0 mean you are sending intructions, 1 means ur sending asci
portb.5 to E 'tells the lcd you want it to read the 4 data pins (high-low trans)
'the above is not code
if you can do that then ignore the below.
you should be able too but keep in mind that both the LCD and your other serial device will have to be syncronized. so if you pulse portc.0, to control the serial device, the lcd will interprete that as you sending it a command and will "read" what is on its data lines as data. ( so you could send a %0000, unitentially, to the lcd.
I WOULDNT RECOMMEND IT unless your sure it will work cause the clock timing is very important in serial control, and usally run at high speeds. the lcds "clock" isnt really a clock. it is more of an "read what is on the port" signal. and the lcd is only updated as you tell it.
a workaround coul be this:
1. do your serial stuff using the portc.0 as clock.
2. the lcd might display weird stuff while this is happening.
3.after serial stuff done, clear the lcd with commands
4. do the lcd stuff.(but this could mess up ur serial device communication)
another could be this if you only need to use ur serial device early in the program, then dont initialize your lcd till its done.
1.do serial stuff
2. once serial stuff is done, init the lcd
3. do lcd stuff(as i said above it could mess with the serial device still)
what is your serial device? eeprom?
if a hardware change is still posible then do some research on a digtal latch, i think thats what it is. bassically its a device that allow you to "disconnect" 8 isolated leads with just 1 pin. basically i could "hand over" a port for another device by isolating the primary device with a digital latch. it may at first seem like youll need more ports but actually is less becuase you can get 16 outputs from 10 pins on the pic (8 for the data + 1 to make the latch A open or close + 1 for latch B) ill try and get a data sheet on the device im thinking of. ok its not called a latch, i know ive used one but cant remeber. maybe somone else will know.
i drew a picture of the "latching" device. i only drew 4 pins per latch for simplicity. also get creative maybe run the control bit for latch 2 thru an inverter making the schematic only requireing 9 bits





Bookmarks