EmbDev.net

Forum: DSP The doubt about GPXDAT


von Ling L. (Company: none) (ling1995)


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!

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.