Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 14th February 2005, 07:33 PM   (permalink)
Default PIC18F452 USART

Hi there,

anyone knows if its possible to use the USART ports with transmission rates less than 4.8kbps which still running the processor at 40MHz?

Thanks!
jfunkie is offline  
Reply With Quote
Old 14th February 2005, 08:02 PM   (permalink)
Default

It depends if you want synchronus or asynchronus mode.
For asynchronus mode, the minimum speed is 2.44K Baud
For synchronus mode, the minimum speed is 39.06K Baud.

Why do you want such low speed anyway?
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline  
Reply With Quote
Old 15th February 2005, 09:00 AM   (permalink)
Default

I need the speeds to be down because i'm using the a radio module to communicate. THe maximum speed of the receiver is 4800kbps..

on another note, is this the best way to transmit and recieve serial data to another pic? or have i chosen the wrong route?
jfunkie is offline  
Reply With Quote
Old 15th February 2005, 10:28 AM   (permalink)
Default

Quote:
Originally Posted by jfunkie
I need the speeds to be down because i'm using the a radio module to communicate. THe maximum speed of the receiver is 4800kbps..

on another note, is this the best way to transmit and recieve serial data to another pic? or have i chosen the wrong route?
You need to implement some kind of encoding, Manchester Coding is the type usually employed. The limitations of the TX/RX modules prevent you sending straight RS232 - although if you invert it you can get away with it. This means either a hardware inverter between PIC's and modules, or using a software UART at each end - which would also allow you to use any speed you require.

Be aware that using Manchester Coding, or another type, will slow the data transfer down - something like 50%.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply With Quote
Old 15th February 2005, 11:53 AM   (permalink)
Default

lost... ops:

confused here... you mean i can't connect the pic directly to the tx/rx module? It accepts CMOS/TTL inputs..
jfunkie is offline  
Reply With Quote
Old 15th February 2005, 12:26 PM   (permalink)
Default

Quote:
Originally Posted by jfunkie
lost... ops:

confused here... you mean i can't connect the pic directly to the tx/rx module? It accepts CMOS/TTL inputs..
The 'resting' output from the UART is high, but the modules can't transmit a DC level - this corrupts the data, as the received ouput goes low (rather noisely) after a number of milliseconds.

As the UART polarity is fixed (it's designed to be used with a MAX232 or similar), you can't connect it to the modules without inverting it. It's also a bad idea to send plain RS232 over a radio link.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply With Quote
Old 15th February 2005, 12:39 PM   (permalink)
Default

hmmm.. okay...

so what will be a good way to send data over RF? something simple?
jfunkie is offline  
Reply With Quote
Old 15th February 2005, 01:02 PM   (permalink)
Default

Quote:
Originally Posted by jfunkie
hmmm.. okay...

so what will be a good way to send data over RF? something simple?
As I mentioned above, Manchester Coding is usually employed.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply With Quote
Old 15th February 2005, 02:47 PM   (permalink)
Default

ahhh... i realise whats gone wrong.. ops:

i already have an IC doing the conversion from RS232 to manchester coded data..

so that would mean that i can just output the data from the PIC in rs232 eh..?
jfunkie is offline  
Reply With Quote
Old 15th February 2005, 03:05 PM   (permalink)
Default

Quote:
Originally Posted by jfunkie
ahhh... i realise whats gone wrong.. ops:

i already have an IC doing the conversion from RS232 to manchester coded data..

so that would mean that i can just output the data from the PIC in rs232 eh..?
Yes, that solves all your problems :lol:

You just need to supply the encoder chip with the correct baud rate (and polarity - I would expect it to be simply pin to pin from the PIC?), it should be included in the application note with it.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply With Quote
Old 15th February 2005, 03:21 PM   (permalink)
Default

cheers mate!
jfunkie is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 07:32 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.