Searching \ for '[PIC]: Several baud rate of RS232C (CCS C) [Was: R' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=rs232
Search entire site for: 'Several baud rate of RS232C (CCS C) [Was: R'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Several baud rate of RS232C (CCS C) [Was: R'
2000\06\02@111128 by David Kott

flavicon
face
> Dear all,
>
> I'm trying to realize two types of baud rate at PIC16F873. The chip
> would convert between 9600bps serial data and 31250bps MIDI data
> described as following two definitions:
> #use RS232C(baud=9600,***)
> #use RS232C(baud=31250,***)
>
> I would like to know how does it work In case that simply "getchar()"
> or "putchar()" is called. Is it possible to use two asynchronous
> transmission and reception by using above definition? At present, PIN_C6
> and PIN_C7 are used for RS232C. The complier is CCS C.
>
> I appreciate if anyone who tried this kind of situations or who knows
> any information would let me know a resolution.
>
> Sincerely yours,
>
> Keishiro Tabe

CCS can indeed do this and there is example code in the "Common Questions
and Answers" section of your PCM manual.

See page 79 of your PCM/PCW manual (rev. July 1999) or the section named
"How can I use two or more RS-232 ports on one PIC?" in your table of
contents.

Basically, you place the #use RS232 directive before any printf(), putc(),
getc() or kbhit() function invocation you use.

for example:

void MyTrivialFunction(void) {

#pragma use RS232 (baud=9600, xmit=PIN_B0, rcv=PIN_B1)
     printf("Hi, this is serial port 1 talking to a PC at 9600.\r\n");
#pragma use RS232 (baud=31250, xmit=PIN_B2,rcv=PIN_B3)
     printf("Hello, Mr. MIDI device, how are you this fine morning?\r\n");
}

would send, at 9600 baud, a message to a terminal listening to RB<0>.  It
would also send a message to a MIDI device listening on RB<2> at 31.250
Kbps.

-d

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...