HC08 Processor Expert Tutorial #2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HC08 Processor Expert Tutorial #2

Jump to solution
5,411 Views
plaiming
Contributor I
I worked through the HC08 tutorial #2 (with red and green LEDs) in processor expert to try and understand how to use beans to drive and monitor the chip I/O. The tutorial uses a keyboard interupt to flash the LEDS. After making the project, I run the debugger but I cant figure out how to "see" the leds flashing from a graphically UI standpoint. Is this possible or do i need to just code in print statements to see when the LEDs functions are called.

This is my first embedded project with codewarrior so maybe i am missing something simple.

Regards,
Paul
Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,361 Views
BlackNight
NXP Employee
NXP Employee
Hello,
what you could use to visualize the LED's: in the simulator/debugger, open the visualization tool (menu Component > Open > Visualizationtool. Then right click on the window and add your instrument (menu Add new instrument > LED). In the properties of the LED configure your variable name or address (Kind of port, port to display (either address or variable name).
If you are debugging with real hardware (not with the simulator), you may set up the refresh mode (perodical): for this use the context menu on the 'background' fot he VisualizationTool.

Hope this gives an idea.

BK

View solution in original post

0 Kudos
Reply
6 Replies
1,362 Views
BlackNight
NXP Employee
NXP Employee
Hello,
what you could use to visualize the LED's: in the simulator/debugger, open the visualization tool (menu Component > Open > Visualizationtool. Then right click on the window and add your instrument (menu Add new instrument > LED). In the properties of the LED configure your variable name or address (Kind of port, port to display (either address or variable name).
If you are debugging with real hardware (not with the simulator), you may set up the refresh mode (perodical): for this use the context menu on the 'background' fot he VisualizationTool.

Hope this gives an idea.

BK

0 Kudos
Reply
1,361 Views
CrasyCat
Specialist III
Hello
 
Can you please specify which version of CodeWarrior you are using
To retrieve that info:
- Start CodeWarrior
- Select Help -> About Freescale CodeWarrior
- Click on "Install Products"
- CodeWarrior version used is displayed on top in the Installed Products dialog.
 
Also which project are you trying to use?
 
generally speaking I would use a Visualization Tool component and add an instrument pointing to the I/O to check that. But I would need to understand what you are using here.
 
CrasyCat
1,361 Views
plaiming
Contributor I
The installed products indicates CodeWarrior Development Studio for Microcontrollers V6.1 Release, build 7285-290ct07

I am running demo when you go to:
Select Help -> Processor Expert -> Tutorials
New windows pops up and i am running HC08 Project 2

I found the visualization tools and was able to create an LED for both red and green.
Now I need to figure out how to link them to the I/O Ports.
The LED Beans are connected to PTB0_ATD0 and PTB1_ATD1
Do I need a memory location or can I link to the port name directly?
Should I select Memory or Variable in the Visualization Port properties.

The other issue is that the demo application uses a keyboard interrupt to trigger the LEDs
lighting up and i dont know how to trigger that.


Regards,
Paul
0 Kudos
Reply
1,361 Views
BlackNight
NXP Employee
NXP Employee
Hello Paul,
in the properties you can map it either to an address (memory address) or to a symbol name. The debugger simply has to know the symbol. So if you see in the debugger the symbol PTB0_ATD0, then you can simply use it too. I just would be careful in case PTB0_ATD0 is in fact a C macro: then it got resolved by the compiler and the debugger may not know about it.

BK
0 Kudos
Reply
1,361 Views
plaiming
Contributor I
I was able to use the memory address to get the LED visualizations to respond properly. If i wanted to use symbols, how do i know what symbols are in the debugger?

To get the port/visualization to work, I had to modify the main function in the processor expert C code with a straight function call to turn the beans port on. The current code is supposed to wait for an interupt on the keyboard port and then turn it on/off. Is there a way i can trigger this interrupt?



0 Kudos
Reply
1,361 Views
BlackNight
NXP Employee
NXP Employee
You can check the variables in the Data window (global data). Another way is to use the inspector component: Menu Component > Open Component > Inspect. Then see the 'Symbol Table' information which lists all the known functions/variables/etc with names and additional properties.

BK
0 Kudos
Reply