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.

Serial output from OSC2 pin?

Status
Not open for further replies.

ttbuddy

New Member
I am using 16F88, due to all the ports B has been use for parallel communication with LCD, I try to use this pin as serial output (Only transmission needed). Can I have basic assembly code for this so that I can further modify it?
I will appreciate for your help. Thanks
 
Most LCD's can be run in 4 bit mode, which would free up some of your used I/O lines, modifying the code for 4 bit vs 8 bit mode is not complex.
 
Last edited:
Most LCD's can be run in 4 bit mode, which would free up some of your used I/O lines, modifying the code for 4 bit vs 8 bit mode is not complex.

I am using 4 bit modes LCD, 2 for RS and E, then 4 for the data buses....
which one is faster?
using OSC2 as serial out or change the assembly code? (For assembly code dumb like me:()
 
The 16F88 has a hardware serial port on RB2 & RB5. RA2 can be internally tied to GND so that's a free I/O pin, same with RA6 (no need to tie it to GND) Moving S1 to port B allows use of the internal pullup and may also allow for interrupt on change (PORTB4..7)
Don't tie MCLR to GND but instead a 10K resistor to VDD (else this can cause problems if you enable MCLR & INTOSC for some programmers)
You could also use a spare I/O for R/W on the LCD (this will allow you to test the busy flag and run the LCD as fast as it can go)
 
The 16F88 has a hardware serial port on RB2 & RB5. RA2 can be internally tied to GND so that's a free I/O pin, same with RA6 (no need to tie it to GND) Moving S1 to port B allows use of the internal pullup and may also allow for interrupt on change (PORTB4..7)
Don't tie MCLR to GND but instead a 10K resistor to VDD (else this can cause problems if you enable MCLR & INTOSC for some programmers)
You could also use a spare I/O for R/W on the LCD (this will allow you to test the busy flag and run the LCD as fast as it can go)

Sorry, actually I am trying to built this project from other author.
Well, if RA2 is used as IO, i will planning to use it as serial out. However software UART is needed instead of the hardware which may be unreliable.
The MCLR has been turned OFF by the author:
Code:
	ifdef	__16F88
 __config _CONFIG1,_BODEN_OFF&_WDT_OFF&_LVP_OFF&_MCLR_OFF&_PWRTE_ON&_INTRC_IO
How can i have serial output? The easiest way perhaps?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top