View previous topic :: View next topic |
Author |
Message |
mcb Guest
|
snychronous |
Posted: Fri Aug 18, 2006 11:07 am |
|
|
how can i use hardware usart module in snychronous mod,i search it on this forum ,i havent found anything yet,i wanna use ck and dt pins.1 start,9 bit and 1 stop bit |
|
|
mcb Guest
|
|
Posted: Fri Aug 18, 2006 11:09 am |
|
|
1 start , 8 data bit and 1 parity bit,1 stop bit |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Aug 18, 2006 11:15 am |
|
|
You should read the datasheet for the PIC and you will find that you can. |
|
|
Guest
|
|
Posted: Fri Aug 18, 2006 11:33 am |
|
|
Mark wrote: | You should read the datasheet for the PIC and you will find that you can. | but i wanna use ccs c code,i write codes on ccs c,idont use assembly,is there any command of function to use usart module in sncyronous mode like #USE RS232(BAUD=9600, XMIT=PIN_B2, RCV=PIN_B1, STREAM=COM_a) i know it s for asncyronous but is teher another one to use sncyronous mode ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Aug 18, 2006 12:13 pm |
|
|
There is no library code for the USART running in synchronous mode.
CCS only has a library for Asynchronous mode. (#use rs232) |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Aug 18, 2006 12:28 pm |
|
|
Anonymous wrote: | Mark wrote: | You should read the datasheet for the PIC and you will find that you can. | but i wanna use ccs c code,i write codes on ccs c,idont use assembly,is there any command of function to use usart module in sncyronous mode like #USE RS232(BAUD=9600, XMIT=PIN_B2, RCV=PIN_B1, STREAM=COM_a) i know it s for asncyronous but is teher another one to use sncyronous mode ? |
Datasheet != ASM
I don't know where you draw the conclusion that a datasheet means to write in ASM! It is a matter of whether or not the hardware supports it and that information is found in the datasheet. You can still write the code in C language. You might not be able to set up the UART with the #use rs232 command, but you can still do it and in C! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Aug 18, 2006 12:52 pm |
|
|
This post shows what Mark is talking about:
http://www.ccsinfo.com/forum/viewtopic.php?t=18734&highlight=usart+synchronous
You can use the CCS #byte and #bit directives to let you write C source
code that directly accesses the USART control registers. Then you can
configure the USART for synchronous mode. Basically, you have to
write your own driver ('library code') for this mode. |
|
|
|