Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LCD to serial

Status
Not open for further replies.

ttbuddy

New Member
I'd built my project which can use to display the characters on the LCD. It uses 4 bits to display it. But now i will need the data to send as serial to another module. What is the most probable way to implement this? :confused:
 
Load the bits into a parallel load shift-register, and then serially send them to another shift-register with parallel output, such as the 4035.

You could also use a UART such as the 16550.
 
The pic16f88 has an uart. You can use that to send data serially. However, thats pin RB2 and RB5 for Rx and Tx. You have have to change your pin mapping so that you can use those pins.

Another approach is to bit bang your data serially through an unused pin, such as RA2. You can find source code for it, or you can write the routine yourself.
 
You could connect a second LCD just like the first, change E to RA2.

Is this a Current meter?

Note:
Don't GND MCLR, tie it to VDD with a 10K resistor. If you enable the internal RC OSC & MCLR you may have a hard time reprogramming it (unless your programmer supports VPP before VDD)
 
I see it's a Watt Hour Meter, you should consider a crystal oscillator if you want the time to be more accurate than the internal oscillator.
 
Load the bits into a parallel load shift-register, and then serially send them to another shift-register with parallel output, such as the 4035.

You could also use a UART such as the 16550.

OK, i will try look at that. However i scare both the timer will be not synchronous. :)
Or maybe I can use this: **broken link removed**

The pic16f88 has an uart. You can use that to send data serially. However, thats pin RB2 and RB5 for Rx and Tx. You have have to change your pin mapping so that you can use those pins.

Another approach is to bit bang your data serially through an unused pin, such as RA2. You can find source code for it, or you can write the routine yourself.

Yes, 16F88 do have UART. However it has been used for the LCD. I just hoping to get the serial data out without modifying the existing design, perhaps. :)

I see it's a Watt Hour Meter, you should consider a crystal oscillator if you want the time to be more accurate than the internal oscillator.

Why is it so?
 
Last edited:
How accurate do you want the clock? Or you could use the AC waveform as a clock source.

Well as 16F88 uses the internal 4 MHz clock .... i scare it cant synchronous with the shift register, will this occur by the way?



Any shift register act like a line passing automatically read parallel data in and transmit serial data out? Cause I found some that needs one input as LOW for parallel input, the HIGH for serial shifting...
 
Last edited:
Code:
The SN54/ 74LS165 is an 8-bit parallel load or serial-in register with
complementary outputs available from the last stage. Parallel inputing occurs
asynchronously when the Parallel Load (PL) input is LOW. With PL HIGH,
serial shifting occurs on the rising edge of the clock; new data enters via the
Serial Data (DS) input. The 2-input OR clock can be used to combine two
independent clock sources, or one input can act as an active LOW clock
enable.

I'd looked at this model, SN54/74LS165 by Motorola. Seems like when PL is LOW, it can load my parallel input. How about my serial output? Does that occurs when the PL HIGH? If this is the case, which means I have to manually change the state of the PL? :(
 
OK...so now i have two options :

Either i use RA2 as an serial output which needs assembly programming on serial routine.

OR

Using parallel in serial out shift register.

I think the second one is more encouraging, any advice?
 
Yes, 16F88 do have UART. However it has been used for the LCD. I just hoping to get the serial data out without modifying the existing design, perhaps. :)

looking at your schematic..how are you using the uart for the lcd ? your loading 4bits at a time...

if this is not pcb, i really think the easiest way is to use the uart. You would only to switch one pin around.


Back to your question, i'd probably say the second is easiest if you have the components available. Otherwise, ra2 as a serial out. which is a bit more work then.....using....the...hardware....u....a..r..t....
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top