Learning material

Hello. I recently board a couple of wixels to make some fun hobby projects. It started of pretty good. I quickly got everything working and loaded the LED blinking example, and it worked great. I looked up the functions in the SDK and got an understanding of what they were.
But then I wanted to dim an external LED. I quickly found the gpio.h library to make the LED glow, but I could not find any functions in the SDK to do pwm. I searched on the forum and on Google but didn’t really find anything good. I did find this though ti.com/lit/an/swru227/swru227.pdf but i could not get it to work. That is not that weird since I do not have any idea about what they riding about. I tried reading the datasheet for the cc2511f32 but I cannot understand that either. So my question is. Do anybody know any good material to read to get an understanding on how to program this microcontroller and how it works.


We provide example code for doing PWM on the Wixel, which you can see here:

github.com/pololu/wixel-sdk/blo … mple_pwm.c

To get more familiar with timers and PWM, you might try reading the code in example_pwm.c carefully and making sure you understand it. For example, the first interesting line of code is:

T3CTL = 0b01110000;   // Prescaler 1:8, frequency = (24000 kHz)/8/256 = 11.7 kHz

You might try to answer these types of questions: What does this line do to the bits in the T3CTL register? What value will the prescaler have after this line runs? Why does that prescaler value result in a PWM frequency of 11.7 kHz from that timer?

If you want to do advanced applications with the Wixel, you will want to be able to take the things explained in the CC2511F32 datasheet and convert them to C code.

You already found the CC2511F32 datasheet and a design note from TI about how to make PWM signals, and both of those are good resources. Unfortunately, I don’t have a specific recommendation for more basic learning material for the CC2511F32. However, you could try looking for general books or websites about microcontrollers, since the high-level concepts they explain (e.g. timers and prescalers) apply to the CC2511F32.

Feel free to ask more questions on this forum.