HI
Can somebody give me the code for making a port of cc2530 +smartrf05eb high?(preferably p1_1)
-teja
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Teja,
P1DIR |= 0x02; // set P1_1 as output
P1 |= 0x02; // set P1_1 high
This maps to P18_6 on SmartRF05EB, but also LED2.
Best regards,
Torbjorn
Thanx torbjorn
I copied the code in zmain.c and tested.(when using transmitapp.c)
It gave 3.3v for the first time but once i reset the board the 3.3v wasnt coming.
Where exactly should i insert this??
Hi Teja,
In reset the GPIOs are Input - pullup (20kOhm). Do you have anything else connected to P1_1 driving against it?
Torbjorn
Hi
No I dont have anything connected to it .
I wanted to connect and LED and check if it was working fine but it didnt.
Teja
Hi Sri,
You didn't mention if you are running some application (i.e Zstack)
on your cc2530 device?
If so, try to place the piece of code suggested by Torbjorn somewhere
in the Init() function of your application and then use Breakpoints to
see if the pin goes high. It is very common that some other module
in the Zstack configures the GPIO and therefore overrides your own
settings for the specific port and pins.
In case you are just doing experiments with CC2530 SoC without
any applications, place that piece of code in the main.c and use the
breakpoints of IAR EW to determine whether the the relevant pin
goes HIGH/LOW.
Hope it helps.
Br,
Igor