The doubt about GPXDAT

OP (Company: none) #4944148
Rate this post
• ▲ 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/TMS320F28335PGFA.pdf[/url])the 
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

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.