16f88 ausart & defines


Results 1 to 17 of 17

Threaded View

  1. #3


    Did you find this post helpful? Yes | No

    Default Re: 16f88 ausart & defines

    The code I use at present for the 9600,8,E,1 reception is

    Code:
    DEFINE HSER_BAUD 9600		'Set Baud rate to 9600bps
    DEFINE HSER_BITS 9		'Set to 9 bit mode
    DEFINE HSER_EVEN 1		'Set Even Parity
    DEFINE HSER_CLROERR 1 		'Clear overflow error automatically
    
    HSERIN [WAIT($87), STR BCMDATA\11]	'Wait for packet start $87 then Rxd 11 bytes into BCMDATA
    The code i use for the 9600,8,N,1 Transmission is

    Code:
    DEFINE HSER_BAUD 9600		'Set Baud rate to 9600bps
    
    HSEROUT [254,192,"Cruise ",#Cruise," Duty ",#DutyCycle]	'Display
    Both the above work fine in seperate programs, my program now needs to combine them into one and swap between one and the other
    during execution.

    So receive some data with parity, process it, then spit it out without parity and repeat.

    Could you help with an example? Your subroutine? Or what registers to change?
    I need to use hserin/out if i can as i can understand it and i'm working with arrays for the rxd data!!
    Last edited by retepsnikrep; - 13th March 2011 at 10:11.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts