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.
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....

OK, as some pins from 16F88 is actually reserved for UART, right? But I juz found out that as long as there is an IO pin, i can use it as serial output. correct me if i am wrong.

It is not a PCB. but it can used both to display at LCD and serial out to module?

So using shift register is hardware UART?
 
Last edited:
if you have an IO pin, such as your RA2, you can make that into a serial output. Its feasible, and please do whatever you are comfortable with. But with an IO pin, unless your using C and unless your compiler has its own function for software uart, you are looking at writing the code for it. Timings, data, the whole enchilada. With hardware uart (using the registers dedicated for uart on those dedicated pins), programming becomes miniminal no matter what language you are using.

If you have CCS, it has a good functions library and one of them is software uart.
 
if you have an IO pin, such as your RA2, you can make that into a serial output. Its feasible, and please do whatever you are comfortable with. But with an IO pin, unless your using C and unless your compiler has its own function for software uart, you are looking at writing the code for it. Timings, data, the whole enchilada. With hardware uart (using the registers dedicated for uart on those dedicated pins), programming becomes miniminal no matter what language you are using.

If you have CCS, it has a good functions library and one of them is software uart.

OK..thanks for the reply. So i will learn for hardware UART. I am using assembly, I'd searched thru the internet, I found tht it is hard to get the code. If you know assembly, i will much appreciate it if you can provide with the most basic assembly hardware UART. Thanks
 
OK..thanks for the reply. So i will learn for hardware UART. I am using assembly, I'd searched thru the internet, I found tht it is hard to get the code. If you know assembly, i will much appreciate it if you can provide with the most basic assembly hardware UART. Thanks

Like I posted earlier, check my tutorials - they give both software and hardware serial routines - and software serial is hardly any more complicated that hardware, both are trivial to do.
 
Like I posted earlier, check my tutorials - they give both software and hardware serial routines - and software serial is hardly any more complicated that hardware, both are trivial to do.

only if you know what you are doing. But not knowing, makes it more difficult. When I did it a few years back, it didnt work right off the bat. The timings were wrong etc.. etc...

Once you KNOW how, then like everything else, its trivial
 
I have to agree with nigel. When you use existing code the hardware and sofware uarts are about the same to set up.

If I am in a hurry I would rather use the software UART because you do not have to deal with the registers to configure the UART. But that is me.
 
I have to agree with nigel. When you use existing code the hardware and sofware uarts are about the same to set up.

If I am in a hurry I would rather use the software UART because you do not have to deal with the registers to configure the UART. But that is me.

I tend to use it, because it means you can use any PIC and any pins.
 
I have to agree with nigel. When you use existing code the hardware and sofware uarts are about the same to set up.

If I am in a hurry I would rather use the software UART because you do not have to deal with the registers to configure the UART. But that is me.

Which means I have to stick with programming the PIC to have software UART for serial output?
So if that is the case, using shift register is inappropriate? Coz I am in a hurry of it ...:eek:
And to me.. modifying existing code is rather difficult to me. *sigh*
 
Status
Not open for further replies.

Latest threads

Back
Top