electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

How to implement a RS-232 serial interface using GPIO?


Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> How to implement a RS-232 serial interface using GPIO?
Author Message
brian



Joined: 09 Jan 2004
Posts: 1


Post02 Feb 2004 8:10   

gpio rs232


[align=justify]
Back to top
Gorilla



Joined: 13 Jan 2003
Posts: 92
Helped: 9


Post02 Feb 2004 12:46   

Re: How to implement a RS-232 serial interface using GPIO?


Next time, it would be a good idea to include a bit more information -- what controller/compiler/assembler/circuit are you using (or planning to use)...

Anyway, http://www.piclist.com/techref/microchip/rs232.htm contains various code (assembly and C) and schematic samples for PICs.

A bit of searching in the web and you'll find a lot more.
Back to top
amru



Joined: 18 Jul 2002
Posts: 23


Post09 Feb 2004 23:02   


I am interested too.
Back to top
bitter



Joined: 12 Sep 2002
Posts: 5


Post13 Feb 2004 1:08   

Re: How to implement a RS-232 serial interface using GPIO?


poor my english Very Happy

I use atmel's mega chip.It's has your function called "soft uart" .
U can goto www.atmel.com and search!
Back to top
eltonjohn



Joined: 22 Feb 2002
Posts: 1751
Helped: 28


Post13 Feb 2004 1:59   

Re: How to implement a RS-232 serial interface using GPIO?


HI ... Yes the question that you ask is a very CURRENT practice to IMPLEMENT a UART when there is no SPECIALIZED hardware to do it.
AS the last message reveals .This is called a SOFT UART . is only HALF DUPLEX .. .. Depending on the MICRO used . generaly a very INEXPENSIVE one .. But almost all of them have a TIMER .. You need to use the TIMER to know when is time to sample the line again ..

The first bit is usually used to trigger some an interrupt to let you know that a byte is on it's way .. ..

there are variations of this of curse .. If you take the PIC12CXX this chip wont allow interrupts .. for evry bit .. so you have to poll the TIMER0 to see when is time to sample the line .. The MSP430 on the other hand relay on TIMER interrupts to sample the line so . You don't have to stop whatever you are doing to process serial data
Back to top
cdcll



Joined: 15 Feb 2002
Posts: 183
Helped: 6


Post13 Feb 2004 2:00   


how about the baud rate of the "soft uart"? can it reach 9600 or 19200?
Back to top
Google
AdSense
Google Adsense




Post13 Feb 2004 2:00   

Ads




Back to top
eltonjohn



Joined: 22 Feb 2002
Posts: 1751
Helped: 28


Post13 Feb 2004 2:24   

Re: How to implement a RS-232 serial interface using GPIO?


Yes it only depends on the speed of the micro .. for a very high data rate you need the cpu to run accordingly .. Some like those PIC12CXX will run at 4Mhz ..Bu the execution cycle is 1 micosec .. depending hoaw many instructions your POLLING routine requires .. this will determine the fastest SOFT UART speed ..
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> How to implement a RS-232 serial interface using GPIO?
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
how to implement GPIO/SEGs multiplexer in ADE7566 (2)
How to interface microcontroller to PC using serial port? (12)
using serial port how can i interface printer (2)
can i using hyperterminal interface USB 2 RS 232 (9)
How to Interface Max 232 to GM47 (1)
how can i cannect 8051 to pc by serial (RS-232) in visual (3)
serial clock GPIO (1)
how to implement CPLD interface ISA slot (6)
How to implement a ultra jitter clock interface? (1)
interface microcontroller to serial port using VB (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS