EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

How to view the I/O Port using IO_Led in Metrowerks V2

Started by uripeled2000 March 16, 2003
Hi
I Use Metrowerks V2 to Develop code for the MC9S12DG256BCPV.
I want to use the simulator and to watch the values of port A
with the IO_LED component but I can't connect this component to port
A. In other words I want to see the Leds changes according to the
values of Port A or Port B values. Can anyone explain to me how it
is done? step by step

Thanks

Uri




Uri,
go with the visualistation tool:
menu open > component > visualizationtool

Then you can add your own instruments,
e.g. context menu (switch first to edit mode):
add new instrument > LED
in the properties of the LED (double click on it),
either specify kind of port with Memory, port to display
with 0x01 (the address),
or with kind of port as 'subscribe', and Port to diaply
as TargetObject.#PORTB (if you have sampleS12 loaded).

PS: try the inspector component (menu component > open > inspect) to
browse through the available TargetObjects.

Erich
> -----Original Message-----
> From: uripeled2000 [mailto:]
> Sent: Sonntag, 16. Marz 2003 10:57
> To:
> Subject: [68HC12] How to view the I/O Port using IO_Led in Metrowerks V2 > Hi
> I Use Metrowerks V2 to Develop code for the MC9S12DG256BCPV.
> I want to use the simulator and to watch the values of port A
> with the IO_LED component but I can't connect this component to port
> A. In other words I want to see the Leds changes according to the
> values of Port A or Port B values. Can anyone explain to me how it
> is done? step by step
>
> Thanks
>
> Uri > -------------------- >
> ">http://docs.yahoo.com/info/terms/





The syntax for the subscription for the SampleS12 IO is
PORTB.PORTB, // PORTB register of PORTB io.
PORTB.PORTBPin0 // Pin0 of PORTB io.
or TargetObject.#1 // global address 1 (hex)

The IO_Led does itself implements the address you specify. So loading and configuring it to be at the PORTB addresses 1/3 will cause
a conflict with the SampleS12.io if you load both.
Use the Led or, my and Erich suggestion, use the VisualizationTool instead.
Once you have setup everything, use HIWAVE's save (or save as) to store all the settings.

Note that the subscription names are all case sensitive, check with the Inspector component for the exact spelling of other IO's.

Bye

Daniel

> -----Original Message-----
> From: Erich Styger [mailto:]
> Sent: Tuesday, March 18, 2003 9:43
> To:
> Subject: RE: [68HC12] How to view the I/O Port using IO_Led in
> Metrowerks V2 > Uri,
> go with the visualistation tool:
> menu open > component > visualizationtool
>
> Then you can add your own instruments,
> e.g. context menu (switch first to edit mode):
> add new instrument > LED
> in the properties of the LED (double click on it),
> either specify kind of port with Memory, port to display
> with 0x01 (the address),
> or with kind of port as 'subscribe', and Port to diaply
> as TargetObject.#PORTB (if you have sampleS12 loaded).
>
> PS: try the inspector component (menu component > open > inspect) to
> browse through the available TargetObjects.
>
> Erich >
> > -----Original Message-----
> > From: uripeled2000 [mailto:]
> > Sent: Sonntag, 16. Marz 2003 10:57
> > To:
> > Subject: [68HC12] How to view the I/O Port using IO_Led in Metrowerks V2
> >
> >
> > Hi
> > I Use Metrowerks V2 to Develop code for the MC9S12DG256BCPV.
> > I want to use the simulator and to watch the values of port A
> > with the IO_LED component but I can't connect this component to port
> > A. In other words I want to see the Leds changes according to the
> > values of Port A or Port B values. Can anyone explain to me how it
> > is done? step by step
> >
> > Thanks
> >
> > Uri
> >
> >
> >
> >
> >
> > --------------------
> >
> >
> >
> > ">http://docs.yahoo.com/info/terms/
> >
> >
> -------------------- >
> ">http://docs.yahoo.com/info/terms/





The 2024 Embedded Online Conference