4750 views|11 replies

197

Posts

0

Resources
The OP
 

Can the P3.1 serial port RXD of STC be used as a normal external interrupt reception? [Copy link]

 
I saw that the pin is labeled INT. I tried to make it an external interrupt but failed. STC12C5A60S2 - WAKE_CLKO = 0x40; ES = 1; EA = 1; void uart_isr() interrupt 4 using 1 { if (RI) { RI = 0; if(PulseCnt == 0) TR1 = 1; //count start PulseCnt ++; } }

This post is from 51mcu

Latest reply

MCUs now have external interrupts, timer interrupts and serial port interrupts, etc. External interrupts are used for us to receive external signals, such as low level, high level trigger (infrared signal can also be set as interrupt receiving signal) to execute things first, timer interrupts must be operated with the internal setting timer, and when the timer time is reached, it interrupts what is being done. The serial port interrupt must have a transmitter and a receiver to complete the work, which is what we often call RX and TX, but what they complete is signal transmission, not a single high or low or level can make it work internally. Of course, if you learn more, you will find that there are also ADC interrupts, watchdog interrupts, etc., but the characteristics of the first three interrupts must be clearly distinguished.  Details Published on 2018-11-23 19:25
 

197

Posts

0

Resources
2
 
It is P3.0RXD, wrong number
This post is from 51mcu
 
 
 

693

Posts

7

Resources
3
 
It cannot be used as an external interrupt. The pins for external interrupt are P32 and P33. P30 and P31 are the pins for serial port interrupt. These cannot be changed.
This post is from 51mcu

Comments

[attachimg]384734[/attachimg] What does this mean? Can it only be used as a wake-up call?  Details Published on 2018-10-29 11:02
 
 
 

197

Posts

0

Resources
4
 
bqgup posted on 2018-10-27 21:47 It cannot be used as an external interrupt. The pins for external interrupt are P32 and P33. P30 and P31 are the pins for serial port interrupt. These cannot be changed
What does this mean? It can only be used as a wake-up?
This post is from 51mcu
 
 
 

4005

Posts

0

Resources
5
 
It is an external interrupt, not a UART interrupt
This post is from 51mcu

Comments

What do you mean? You mean it can be made into an external interrupt? But the external interrupts are only INT0 and INT1.  Details Published on 2018-11-5 16:56
What do you mean? You mean it can be made into an external interrupt? But the external interrupts are only INT0 and INT1.  Details Published on 2018-11-5 16:27
 
 
 

606

Posts

20

Resources
6
 
Upstairs is right.
This post is from 51mcu
 
 
 

197

Posts

0

Resources
7
 
huo_hu posted on 2018-10-29 13:28 It is an external interrupt, not a UART interrupt
What do you mean? Do you mean it can be made into an external interrupt? But the external interrupts are only INT0 and INT1.
This post is from 51mcu
 
 
 

197

Posts

0

Resources
8
 
huo_hu posted on 2018-10-29 13:28 It is an external interrupt, not a UART interrupt
Its pin is marked as INT. How do you write the program? Can you explain it more clearly?
This post is from 51mcu

Comments

It is the same as the traditional 51 int0 and int1, which are in the oldest books.  Details Published on 2018-11-6 14:00
 
 
 

4005

Posts

0

Resources
9
 
tangwei8802429 posted on 2018-11-5 16:56 Its pin is labeled INT. How to write the program? Can you explain it more clearly?
It is the same as the traditional 51 int0 and int1, which are all in the oldest books.
This post is from 51mcu
 
 
 

282

Posts

2

Resources
10
 
The serial port interrupt pin cannot be used as an external interrupt. The serial port interrupt pin can only be used as a serial port pin or a normal pin. External interrupts have special pins. Otherwise, why do we need external interrupt pins?
This post is from 51mcu
 
 
 

3

Posts

0

Resources
11
 
The P3.0 and 3.1 pins of STC are very important, as they are used as ports for downloading programs and as emulators for debugging under Keil software. Why do we need to use P3.0 and P3.1 when there are so many ports?
This post is from 51mcu
 
 
 

9

Posts

1

Resources
12
 
lgwd55 posted on 2018-11-21 13:14 The P3.0 and 3.1 pins of STC are very important, as the download program port and as the emulator debugging under Keil software. Why do we need to use P3.0 and P3 when there are so many ports?
MCUs now have external interrupts, timer interrupts and serial port interrupts, etc. External interrupts are used for us to receive external signals, such as low level, high level trigger (infrared signal can also be set as interrupt receiving signal) to execute things first, timer interrupts must be operated with the internal setting timer, and when the timer time is reached, it interrupts what is being done. The serial port interrupt must have a transmitter and a receiver to complete the work, which is what we often call RX and TX, but what they complete is signal transmission, not a single high or low or level can make it work internally. Of course, if you learn more, you will find that there are also ADC interrupts, watchdog interrupts, etc., but the characteristics of the first three interrupts must be clearly distinguished.
This post is from 51mcu
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list