Two issues when I'm tring to use Timer 1 mode 2 ( 8-bit auto reload mode, it's used by uart to set the baud rate)
- TL1's value is not updated UNLESS mcu monitor is displayed with TCON monitored.
It seems that some operation in i51core directly access mem , instead of calling GET_RAM, so the watcher on the TL1 won't be triggered and it's value not get updated. I changed all direct access to m_dataMem to GET_RAM and SET_RAM.
- TL1's value is counted starting from 0, instead from value in TH1.
When TLx get updated, add the value in THx to it.
- TL1's value is not updated UNLESS mcu monitor is displayed with TCON monitored.
It seems that some operation in i51core directly access mem , instead of calling GET_RAM, so the watcher on the TL1 won't be triggered and it's value not get updated. I changed all direct access to m_dataMem to GET_RAM and SET_RAM.
- TL1's value is counted starting from 0, instead from value in TH1.
When TLx get updated, add the value in THx to it.
- Attachments
- 8051timer.zip
- You don't have permission to download attachments.
- (2 Kb) Downloaded 1 times