EmbDev.net

Forum: DSP The doubt about GPXDAT


Author: Ling Ling (Company: none) (ling1995)
Posted on:

Rate this post
0 useful
not useful
Good afternoon~all
When I begin to learn DSP ,the chip I used is TMS320F28335,(This is the 
TMS320F28335's datasheet: 
http://www.kynix.com/uploadfiles/pdf9675/TMS320F28... 
develop environment is CCS6.0 . After entering into the experiment of 
open leds, I found a very odd questions:
Three LEDs are controlled by three I/O,it’s defined as followings:
#define LED2_ON GpioDataRegs.GPADAT.bit.GPIO0
#define LED3_ON GpioDataRegs.GPADAT.bit.GPIO1
#define LED4_ON GpioDataRegs.GPADAT.bit.GPIO2
Then the leds will flash in the while(1)
while(1)
        {

                LED2_ON = 1;
                LED3_ON = 1;
                LED4_ON = 1;

                delay();

                LED2_ON = 0;
                LED3_ON = 0;
                LED4_ON = 0;

                delay();
However,there just two leds flashed when the hardware simulating.After I 
changed the programs:
#define LED2_ON GpioDataRegs.GPASET.bit.GPIO0
#define LED3_ON GpioDataRegs.GPASET.bit.GPIO1
#define LED4_ON GpioDataRegs.GPASET.bit.GPIO2

#define LED2_OFF GpioDataRegs.GPACLEAR.bit.GPIO0
#define LED3_OFF GpioDataRegs.GPACLEAR.bit.GPIO1
#define LED4_OFF GpioDataRegs.GPACLEAR.bit.GPIO2
Then the main function is :
while(1)
        {

                LED2_ON = 1;
                LED3_ON = 1;
                LED4_ON = 1;

                delay();

                LED2_OFF = 1;
                LED3_OFF = 1;
                LED4_OFF = 1;

                delay();
Who can tell me why it still can’t realize three leds flashed together?
Thanks a lot!

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.