Forum : 8051
Original Post
Post Information | Post |
---|---|
April 17, 2007 - 11:31pm
|
How is the ISR Vector address specified for UART1 on a uPSD. According to the help files in RIDE the following is demonstrated: Priority Source Flag Vector address Interrupt number According to the ST datasheets the Vector Address for the uPSD is 004Bh. Any ideas? |
Hello,
This list is not exhaustive. In fact here is the algorithm used (0x03 and 0x08 are modifiable values but here is the default behavior):
int_addr = 0x03 + (0x08*int_number), which leads to int_number = (int_addr - 0x03) / 0x08.
In your case, with int_addr = 0x4B, you get the interrupt number 9. So you can define your routine like this :
Addition for uPSD devices :
The interrupt numbers and vector addresses are already defined in the header files. For example, you have
in upsd3300.h.
so you can use
Easy, isn't it?
regards,
Lionel