PDA

View Full Version : 8 data and parity using HSERIN, HSEROUT



Smity42
- 30th March 2006, 13:22
Is it possible to set up 8E1 and/or 8O1 (8 data bits, 1 parity bit, 1 stop bit) using the hardware usart on a PIC16F88.

There is a setting for SERIN2 and SEROUT2 that allows you to use these modes, but I would rather use the HSERIN and HSEROUT commands if possible.

BTW i have Pro compiler... if it helps.

Dave
- 30th March 2006, 13:57
Smity42, Use the command DEFINE HSER2_BITS 9 to setup the hardware serial uart for 9 bit transmittions and then use DEFINE HSER2_ODD or HSER2_EVEN to set the parity state. Its all in the manual....

Dave Purola,
N8NTA

Smity42
- 3rd April 2006, 02:45
Hi dave,

thanks for your help. I was looking at the HTML manual (http://www.melabs.com/resources/pbpmanual/) and it has no mention of the HSER_BITS define at all, and I have no idea where my printed manual has got to. So I checked the PDF one and found it. Thanks muchly

Martin