Mar 26, 2021
01:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 26, 2021
01:28 AM
BYTE TEMP;
void FX2LPSerial_Init() // initializes the registers for using Timer2 as baud rate generator for a Baud rate of 38400.
{
TMOD = (TMOD & 0x0F) | 0x20;
CKCON |= 0x10;
PCON |= 0x80 ;
EICON |= 0x80;
SCON1 = 0x50;
TH1 = 0xB2 ;
ES1 = 1;
TR1 = 1;
EA = 1;
}
void send_data(BYTE source)
{
SBUF1 = source;
while(TI1 == 0);
TI1 = 0;
}
void send_isr() interrupt 7
{
if(RI1 == 1)
{
RI1 = 0;
TEMP = SBUF1;
}
}
Solved! Go to Solution.
Labels
- Labels:
-
serial 68013
- Tags:
- not working
1 Solution
Apr 13, 2021
08:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 13, 2021
08:36 PM
Hi,
理论上是不应有冲突的,你可以先用这里面的固件测试一下你的板子
2 Replies
Mar 28, 2021
06:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 28, 2021
06:40 PM
Apr 13, 2021
08:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 13, 2021
08:36 PM
Hi,
理论上是不应有冲突的,你可以先用这里面的固件测试一下你的板子