I have a question on the watch window in the sample program for the HC11 Evaluation Board. This sample program makes use of the MC68HC24 port replacement unit.
I set up a watch window to watch both Port B and C. When I type a value in the virtual terminal, I can see the changes by watching the logic state of the pins on the MC68HC24 on both Port B and Port C, but in the watch window it always shows the Port values as 0x00 even though they are changing as shown by logic state of the pins on the Port replacement unit.
Is this a limitaion of the Simulator? If so, it means that any code that reads the Port value and does something with it will not work and will create improper operation.
Any comments on this would be appreciated.
Thanks
Motorola HC11 Evaluation Board
Re: Motorola HC11 Evaluation Board
The watch window shows the internal registers values of the HC11 core only, i.e. U1 in the "HC11 Evaluation Board" sample project.
So, the PORTB/PORTC registers values in the watch window are referring to the ports embedded in U1, the 68HC11 not U12, the 68HC24.
In the HC11 Evaluation board, the 68HC11 is configured as Expanded mode where PORTB and PORTC are unavailable as IO ports. They both work rispectively as expanded bus for High Byte Address and Multiplexed Low Address/Data; that's the reason as to why you get no IO values.
PORTB and PORTC are available as internal IO ports only when the 68HC11 is configured in Single Chip Mode, where PORTB and PORTC and strobe A and strobe B are available for general purpose parallel IO.
The 68HC24 is just an external peripheral and as such the Watch window does not show 68HC24 internal registers. This is also true for other peripherals like the UART or EPPROM/RAMs.
So, the PORTB/PORTC registers values in the watch window are referring to the ports embedded in U1, the 68HC11 not U12, the 68HC24.
In the HC11 Evaluation board, the 68HC11 is configured as Expanded mode where PORTB and PORTC are unavailable as IO ports. They both work rispectively as expanded bus for High Byte Address and Multiplexed Low Address/Data; that's the reason as to why you get no IO values.
PORTB and PORTC are available as internal IO ports only when the 68HC11 is configured in Single Chip Mode, where PORTB and PORTC and strobe A and strobe B are available for general purpose parallel IO.
The 68HC24 is just an external peripheral and as such the Watch window does not show 68HC24 internal registers. This is also true for other peripherals like the UART or EPPROM/RAMs.
Kind regards,
Ettore Arena - Labcenter Electronics.
Ettore Arena - Labcenter Electronics.
-
- Unlicenced User
- Posts: 6
- Joined: Wed 2015-12-23 5:31
Re: Motorola HC11 Evaluation Board
Thank you so much for the detailed reply
Re: Motorola HC11 Evaluation Board
Yeah, these details are very helpful as well.