CodeWarrior Visualization Tool Documentation

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

CodeWarrior Visualization Tool Documentation

12,653 Views
bespenschied
Contributor III
I am trying to use the Visualization tool in the True-time Simulator of Codewarrior for the HC08. I can not find any documentation on this tool that explains how to use it. The documentation I found is VERY limited and does not explain any specifics.
For ex. If you use a PushSwitch there are many options under the Kind of port. None of them are explained. I can not get the switch to actually toggle a port pin like a switch would do no matter what I have the settings set to.
 
The LED tool is easy to use and works fine.
 
Anyone ever use this tool and have any ideas?
 
This tool is found under the Component menu item of the simulator.
 
Thanks!
 
Labels (1)
Tags (1)
0 Kudos
Reply
11 Replies

2,646 Views
pvezzali
Contributor I

i'm with the same doubt.
when i click over the switch button, nothing happens.

Can anyone help us??

0 Kudos
Reply

2,646 Views
CrasyCat
Specialist III
Hello
 
The only documentation available on Visualization tool is located in the manual {Install}\Help\pdf\Debugger_HC12.pdf in chapter ""Book I - Debugger Engine", section "Debugger Components" -> "Visualization Utilities" -> "Visualization Tool".
 
I assume you want to use the "Switch" instrument. Am I right?
To connect it to Bit 0 in PORT A (allocated at address 0), initialize properties as follows:
    - Kind of Port: memory
    - Port to Display: 0 (address of the port)
    - Size: 1 Byte (as a port is 1 byte wide).
    - Bit number to display: 0
    - Top Position: Adjust which value is represented by top position.
 
According to the manual above "The behavior of the Push Button slightly differs from the others, since it returns to its initial state as soon as it has been released."
 
So when you release the button it changes back to its initial state.
Not sure this is what you are looking for.
CrasyCat
0 Kudos
Reply

2,646 Views
bespenschied
Contributor III

Thanks,

The manuals that came with the HC08 version I have do not have any specific information like you wrote. I did actually do what you wrote. It makes sense it would work that way. But I got no response from the switch. I could click it 100 times and there was no change in portA. I could even hold it down for a period and it would not indicate any change. The little 0 on the switch would never change to a 1 either. I have it connected to the KBI module of the HC08 and set up for interrupts. I do not get any interrupts on that pin in simulation mode either. Can I download the manual somewhere?

bcde

 

0 Kudos
Reply

2,646 Views
CrasyCat
Specialist III

Hello

Oups sorry, I provide you with reference to HC12 instead of HC08 manuals.

For HC08 information is located in manual {Install}\Help\pdf\Debugger_HC08.pdf in chapter ""Book I - Debugger Engine", section "Debugger Components" -> "Visualization Utilities" -> "Visualization Tool".

Which version of the HC08 tools are you using? I have tried with CodeWarrior V5.0. I placed a LED instrument on bit 4 in PORTA and I defined a switch instrument at same address and port.

In the Visualization tool component I have set Refresh Mode to Periodical, I have then switched the component to Display mode (Just click on the top left button in the visualization tool tool bar).

Pressing the button changes the color of the LED and memory is also updated.

Make sure to initialize the DDRA register appropriately before to make sure this works.

CrasyCat

0 Kudos
Reply

2,646 Views
bespenschied
Contributor III
I am still having troubles getting this to work. The LED's are easy and work. I am trying to simulate an interrupt on the KBI module with a pushbutton. It never triggers an interrupt. I am using KBD3(PTA3) as an input. I have the KBI initialized and the interrupts enabled. I add a pushbutton tool and set it to MEMORY, Port 0x00, bit number 3, and bounces disabled for now. when i run the program and press the pushbutton, it does not change. If I connect the pushbutton to an LED like you explained in an earlier post I can see the pushbutton change state and the LED turns on and off. I put a breakpoint on the keyboard interrupt routine to see if the program ever got to that point and it never does. Any Ideas?
 
Thanks
BCDE
0 Kudos
Reply

2,646 Views
CrasyCat
Specialist III

Hello

In fact the Visualization component can be used to get a graphical view of some objects in your application. You can also stimulate memory changes, but it will not allow you to stimulate interrupts.

As you are using HC08 Full Chip simulation I can suggest you to use a "Command" Instrument and use the appropriate command to activate KBI interrupt.

Please refer to {Install}\Help\pdf\Debugger_HC08.pdf, chapter "Book III - HCS08 Debug Connection", section "HCS08 Full Chip Simulation" -> "Peripheral Modules Commands" -> "Keyboard Interrupt Module" for information on commands to activate KBI interrupt.

I hope this helps.

CrasyCat

0 Kudos
Reply

2,646 Views
bespenschied
Contributor III

I have been playing with the Visualization tools and found the following to be true. If the port pin you have an LED or Switch connected to is set as an output pin you can use the switch or led to change the state of the pin. If it is an input pin no change occurs. Ex. I connect an LED to PTB5 (Kind of Port-Memory, Port 0x01, bit to display-5) if you use your mouse to click on the LED it changes the bit on PB5. You can see the change in the memory component window. I set the mode of the memory component window to peridocial 10ms. The same thing happens if you use a switch. If the port is set to an input, there is no state change on the PTB5 pin. So if you are needing a port to be an input the visualization tools seem to have no effect. What am I missing?

I tried the command window and it does work for the KBI module. Thanks. The HC08 series parts does not have an actual component module listed in the menu drop down list for the KBI module like the HCS08 parts. According to the manual you just use the inputX command to change the state of the pin. I could not find a command to just change the state of one pin, you always have to write 8 bits to the memory location.

 

BCDE

0 Kudos
Reply

2,646 Views
firby
Contributor I
hello,

I have a similar probleme : i'd like simulate a square signal in input on a timer input, and visualise an output pin on a virtual oscilloscope, but , i dont know how to do that ... (all this unsing processor expert, and the simulator included) , can you help me ?

Thank in advance , Firby.
0 Kudos
Reply

2,646 Views
bespenschied
Contributor III

firby,

I have been trying to learn this visualization tool for a while. If you have not done so yet, you should read the manual first and try to make sense of it and then play with the commands to see them work. the manual is located at {Install}\Help\pdf\Debugger_HC08.pdf, chapter "Book I - Debugger Engine" - Visualization Utilities. I will try to help more as I get used to the tool.

0 Kudos
Reply

2,646 Views
bespenschied
Contributor III

CrasyCat,

I have received my upgrade to CodeWarrior V5 and it works much better. I found the documentation you referenced. It does not explain what the different "Kind of Port" options mean. Substitute, Subscribe, Variable, Register, Memory. I have an LED connected to PTB5. In order to get the LED to work I had to set the port type to Memory and Port to Display is 0x01. The manual for the 68HC908 I am using calls this location a register PTB. Could I set Kind of Port to Register and put "PTB" in the Port to Display field? This kind of information would be helpful. What values are allowed for each of the entries? Right now I just have to experiment to see which one works.

Thanks for your help!

 

 

0 Kudos
Reply

2,646 Views
bespenschied
Contributor III

It appears the problem I am having is the same I was having with another post I started about code not running in my target but running in debug mode. My version is too old and they don't have any updates. I am working on an upgrade now so it will hopefully fix these problems. I will report when I get the license taken care of.

Thanks for your help! I hope I can help someone in the future to pay back the favor!

bcde

 

0 Kudos
Reply