ISRRX Defaults

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

Post Reply
Widgetman
Posts: 136
Joined: Sun Dec 16, 2007 7:39 pm
Location: Florida

ISRRX Defaults

Post by Widgetman » Mon Mar 07, 2011 9:27 pm

Hi,
Does anyone know what the defaults are when you set the baud rate ?
By this I mean is it N,8,1 and if so can it be changed for parity and stop bits ?
Thanks



Here is my Init code
ISRRX.Initialize // init the ISRRX module!
USART.SetBaudrate(br4800)

gramo
Registered User
Registered User
Posts: 200
Joined: Tue Mar 20, 2007 6:55 am
Location: Australia
Contact:

Post by gramo » Tue Mar 08, 2011 9:47 am

The EUSART module defaults to 8N1.

There isn't a whole lot of configuration available.. 9-bit mode will cost you the parity bit, that's about all you can do.
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.

Australian distributor for the Swordfish Compiler

Jerry Messina
Swordfish Developer
Posts: 1470
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Post by Jerry Messina » Tue Mar 08, 2011 10:31 am

Yeh, the EUSART hardware in the 18F doesn't have many features...about the only thing you can change is the selection of using 8 or 9 bits. You can use those bits for anything you like, such as parity or an additional stop bit, but you'll have to do it all in software.

You can do 7+parity+stop bits, 8+parity+1stop, 8+2 stop, but you can't do 8+parity+2stop without doing the second stop bit purely as a software delay, or perhaps using a timer.

The USART.bas module doesn't support anything other than N81, so you'd have to add in any new functionality.

Post Reply