#if 0 // SCI0 ERI0 void Excep_SCI0_ERI0(void){ } // SCI0 RXI0 void Excep_SCI0_RXI0(void){ } ・・・ 中略 ・・・ // SCI6 TEI6 void Excep_SCI6_TEI6(void){ } #endif |
#include <rx621rslib.h> |
//RX621RSLIBサンプル #include <rx621rslib.h> extern "C" { void abort(void) { } } int ncom= 0; unsigned char buf[32]; int main(void) { int frame= 0; RXRS_Open(ncom,12); //BRR 12= 230769.2 [bps] for(;;){ //受信処理 int n= RXRS_CheckRecv(ncom); RXRS_Printf(ncom,"frame=%d recv_size=%d\r\n",frame,n); if(n>0){ RXRS_Recv(ncom,buf,n); } delay_ms(100); frame++; } return 0; } |
#define RXRS_RECVBUFFERSIZE0 4096 #define RXRS_SENDBUFFERSIZE0 256 #define RXRS_RECVBUFFERSIZE1 4096 #define RXRS_SENDBUFFERSIZE1 256 #define RXRS_RECVBUFFERSIZE2 4096 #define RXRS_SENDBUFFERSIZE2 256 #define RXRS_RECVBUFFERSIZE3 4096 #define RXRS_SENDBUFFERSIZE3 256 #define RXRS_RECVBUFFERSIZE5 4096 #define RXRS_SENDBUFFERSIZE5 256 #define RXRS_RECVBUFFERSIZE6 4096 #define RXRS_SENDBUFFERSIZE6 256 #include <rx621rslib.h> |
brr ->ボーレート[bps] 0 ->3000000.0 [bps] 1 ->1500000.0 [bps] 2 ->1000000.0 [bps] 3 -> 750000.0 [bps] 4 -> 600000.0 [bps] 5 -> 500000.0 [bps] 6 -> 428571.4 [bps] 7 -> 375000.0 [bps] 8 -> 333333.3 [bps] 9 -> 300000.0 [bps] 10 -> 272727.3 [bps] 11 -> 250000.0 [bps] 12 -> 230769.2 [bps] 25 -> 115384.6 [bps] 51 -> 57692.3 [bps] 77 -> 38461.5 [bps] 95 -> 31250.0 [bps] 155 -> 19230.8 [bps] |
SCI0: ポートP21 =RXD, P20 =TXD SCI1: ポートP30 =RXD, P26 =TXD SCI2: ポートP12 =RXD, P13 =TXD SCI3: ポートP25 =RXD, P23 =TXD SCI5: ポートPC2 =RXD, PC3 =TXD SCI6: ポートP33 =RXD, P32 =TXD |
#define SCI2_RXDTXD_P52P50 #include <rx621rslib.h> |