Reply by Hardeep Gida September 29, 20052005-09-29
Hi Edriano,
 
Processor Expert (PE) does take a little getting used to as it generate alot of the intialization/setup code for you. All peripheral registers are accessed through macros that are generated. In order to set/clear a GPIO pin is relatively easy with PE though you're probably used to doing it "manually".
 
GO to Bean selector window and choose CPU Internal Peripherals>>Port I/0 >>BitIO. Double clicking on BitI/O will add this bean to you project. Then go to the Bean Inspector window. Here you can decide which GPIO port and pin you'd like to choose. You can select whether you'd like that pin to have pull up/pull down resistor, input or output, etc.(of course these setting depends on the DSP you're working with). Next all you do is generate the code. In the project window, select the Processor Expert tab and expand that bean by clicking on the +. These are all the functions that you might use (ie: SetVal(set GPIO to 1), ClrVal(set GPIO to 0)). Pick and drag the function you want to use to your main. To check to see whether your GPIO is working, just hook it up to an oscilloscope.  
 
I encourage you to look through the files that PE generates because after a few readings you start to understand where all the variables and macros are coming from. There are very limited examples of code without the use of PE. I appears that slowly freescale is trying to push PE on every processor.
 
Good luck and hope that helps!
 
Hardeep


From: m...@yahoogroups.com [mailto:m...@yahoogroups.com] On Behalf Of edriano2000
Sent: Thursday, September 29, 2005 8:57 AM
To: m...@yahoogroups.com
Subject: [motoroladsp] new member

Hello all, my name is edriano, i am an electronic engineer and i am
starting to work with these DSP 56F8013, i am used to work with
codewarrior for microcontrolers, but working with DSPs is a little
different.
I would like to ask you, does anyone know where to find exemples in
asm or pure c for these DSPs, because most of all in at freescale
website are in PE, and as I am to learn the structure with PE it does
not seem to be a easy task, for example is that possible to define
GPIO as I define at codewarrior for microcontroler, and access it as a
variable?

like GPIO = 0X0001; for example.

for microcontroler i define in this way

unsigned volatile GPIO @address but in codewarrior 7.1 it is not
possible.

thanks in advance.


Reply by Yochum, William September 29, 20052005-09-29
To do what your want, use a macro definition:
 
For a 16-bit register ...
 
#define GPIO    (* (volatile unsigned int *) (<address>) )
 
substitute <address> with the fixed address of the GPIO register,
for example 0x13B0 (I don't know what the real value is for the 56F8013)
 
Now you can reference "GPIO = 0x0001;" in your code.
 
 
This is a very general technique and applies to any "C" compiler.
 
-- Bill

-----Original Message-----
From: edriano2000 [mailto:e...@stptel.com.br]
Sent: Thursday, September 29, 2005 8:57 AM
To: m...@yahoogroups.com
Subject: [motoroladsp] new member

Hello all, my name is edriano, i am an electronic engineer and i am
starting to work with these DSP 56F8013, i am used to work with
codewarrior for microcontrolers, but working with DSPs is a little
different.
I would like to ask you, does anyone know where to find exemples in
asm or pure c for these DSPs, because most of all in at freescale
website are in PE, and as I am to learn the structure with PE it does
not seem to be a easy task, for example is that possible to define
GPIO as I define at codewarrior for microcontroler, and access it as a
variable?

like GPIO = 0X0001; for example.

for microcontroler i define in this way

unsigned volatile GPIO @address but in codewarrior 7.1 it is not
possible.

thanks in advance.

The information contained in this message is confidential and intended only for use of the designated recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this message in error, and that any review, dissemination, distribution, copying, or alteration of this message is strictly prohibited. If you have received this communication in error, please notify the originator immediately and remove it from your system.



Reply by edriano2000 September 29, 20052005-09-29
Hello all, my name is edriano, i am an electronic engineer and i am
starting to work with these DSP 56F8013, i am used to work with
codewarrior for microcontrolers, but working with DSPs is a little
different.
I would like to ask you, does anyone know where to find exemples in
asm or pure c for these DSPs, because most of all in at freescale
website are in PE, and as I am to learn the structure with PE it does
not seem to be a easy task, for example is that possible to define
GPIO as I define at codewarrior for microcontroler, and access it as a
variable?

like GPIO = 0X0001; for example.

for microcontroler i define in this way

unsigned volatile GPIO @address but in codewarrior 7.1 it is not
possible.

thanks in advance.