Parallel to serial output

Thread Starter

sanwa

Joined Jan 18, 2009
36
Hi everyone, I am guessing am i able to to have the currently data buses that is used to displayed the characters on the LCD to send as serial data to my other module? 4 bits data are used to display the characters, then i am thinking to use this 4 data buses connected to a parallel to serial shift register so that I can have both data displayed at the LCD and serial data to my module. I am using 16F88 ... I am scaring the problem of synchronization between the two. :eek:
 

beenthere

Joined Apr 20, 2004
15,819
The uC has two serial interfaces built in - why not use one of those? The data sheet has all the information you need to send/receive data - assuming your "module" has similar capabilities.
 

mik3

Joined Feb 4, 2008
4,843
If you are using the internal oscillator of the PIC you can configure it to output a clock signal on one of its crystal oscillator pins. This clock signal will be synchronized with the PIC clock and you can clock other devices.
 

Thread Starter

sanwa

Joined Jan 18, 2009
36
The uC has two serial interfaces built in - why not use one of those? The data sheet has all the information you need to send/receive data - assuming your "module" has similar capabilities.
Well I know it, just that RB1, RB2 for SPI mode already used in DB to the LCD while RB4 and RB5 for AUSART also used for E and RS LCD respectively.
 

thatoneguy

Joined Feb 19, 2009
6,359
Is the question that you want to be able to use the pins that currently "talk to" the LCD for other purposes while not updating the display?
 

thatoneguy

Joined Feb 19, 2009
6,359
Is this a circuit/program that is already built, or can the pins be reassigned?

Keep the LCD Enable and serial clock (SPI you said?) as seperate pins, use serial module data on an LCD data line.

When LCD isn't enabled, signals while talking to the serial module will be ignored. When the serial module doesn't have a clock and the LCD is Enabled, signals going to the LCD will be ignored by the serial module, but displayed on the LCD.

Or am I missing something?
 

Thread Starter

sanwa

Joined Jan 18, 2009
36
Is this a circuit/program that is already built, or can the pins be reassigned?

Keep the LCD Enable and serial clock (SPI you said?) as seperate pins, use serial module data on an LCD data line.

When LCD isn't enabled, signals while talking to the serial module will be ignored. When the serial module doesn't have a clock and the LCD is Enabled, signals going to the LCD will be ignored by the serial module, but displayed on the LCD.

Or am I missing something?
Yup, I'd built this circuit.
Erm.. sorry for my poor english, might not getting what u mentioned.
So u mean have 2 connections from RB4. When it is connected to the LCD, it enables it.
So when it is connected to the serial module, it will SPI to the module?
 

thatoneguy

Joined Feb 19, 2009
6,359
The serial module should ignore any voltage changes on it's input pin unless they come with a clock signal. I use "should" as I don't know anything about it.

The LCD ignores any changes on it's input pins if the Enable signal isn't present.

The serial module and LCD would see the all the signals on that bus. Only the enabled device will act on what signals are seen on the bus/wire/line.

All of the actual switching is done in code, by only using one device at a time, with the correct lines/pins.
 

Thread Starter

sanwa

Joined Jan 18, 2009
36
The serial module should ignore any voltage changes on it's input pin unless they come with a clock signal. I use "should" as I don't know anything about it.

The LCD ignores any changes on it's input pins if the Enable signal isn't present.

The serial module and LCD would see the all the signals on that bus. Only the enabled device will act on what signals are seen on the bus/wire/line.
I am glad to have your reply. Well, how about if i am using shift register then?
convert the parallel IO to serial using IC like  SN74HC165N?
 

Thread Starter

sanwa

Joined Jan 18, 2009
36
According to the datasheet is CE (Clock Enable) and PL (Parallel Load) both High, pins 1 and 15 on the 74165 is HOLD for that IC.

http://www.datasheetcatalog.com/datasheets_pdf/S/N/7/4/SN74HC165N.shtml
Rich (BB code):
Parallel-in access to each stage is provided by eight individual direct data (A−H) inputs that are enabled by a low level at the shift/load (SH/LD) input.
I tot there must be a LOW in order to load the parallel input? Without clock input, shifting is impossible right? ;)
 

thatoneguy

Joined Feb 19, 2009
6,359
Rich (BB code):
Parallel-in access to each stage is provided by eight individual direct data (A−H) inputs that are enabled by a low level at the shift/load (SH/LD) input.
I tot there must be a LOW in order to load the parallel input? Without clock input, shifting is impossible right? ;)
Those two pins will only be high when writing to the LCD. Once the LCD write is finished, you can enable the shift register to listen by dropping the Enable on LCD, then setting up the Clock and load pins as you normally would. As long as the LCD enable is low, you can send data to/from the shift register as if the LCD Display wasn't present (since it is not enabled).

Check google for articles on parallel bus multiplexing if the concept doesn't make sense, some other articles may describe the process better than I am. Or Wikipedia's entry on data bus.
 
Top