Login / Register  0 items | $0.00 New What is KVR? Submit News Advertise

My doubt

ling1995
KVRer
 
1 post since 18 Mar, 2017

Postby ling1995; Mon Mar 20, 2017 12:21 am My doubt

Hello~all
When I begin to learn DSP ,the chip I used is TMS320F28335. 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? How to solve it?
Thanks a lot!
Kraku
KVRian
 
1358 posts since 13 Oct, 2003, from Prague, Czech Republic

Postby Kraku; Tue Mar 21, 2017 11:06 am Re: My doubt

1. Wrong website.

2. Are you able to blink the leds one by one? Do they turn on and off when other leds aren't touched?

3. Check your pin configuration. You might have one of the pins connected to the LEDs unconfigured/misconfigured.

Moderator: Moderators (Main)

Return to DSP and Plug-in Development