Please need help,
I'm new to Micropython, (although I have made python scripts some times, mostly for electronics) using the CC3200 port on a Ti LaunchXL board, my question is:
How is related the creation of a timer in PWM mode and the pin is supposed to be driven by this PWM output?
e.g.
pw_1=Pin('GP11',mode=Pin.ALT,alt=3)
pw_ltimer=Timer(2,mode=Timer.PWM)
a_channel=pw_timer.channel(Timer.B,freq=12,duty_cycle=15)
I can not see how is related the pin with the timer referenced in the channel definition.
any help or guidance will be greatly appreciated.
Junior Vargas.-
PWM and Pins
Re: PWM and Pins
Usually the relationship is defined in how the hardware is wired up. There often isn't any obvious relationship, and consulting the datasheet is the way to figure things out if it isn't documented elsewhere.
Re: PWM and Pins
Hi Dave,
thanx a lot, your fast guidance got me to the answer (on the datasheet), I was not clear about.
May I have another question:
How can I disable the heartbeat for my cc3200-Launchxl board (and the thing can't come to live after a cold reset), cause I'm planning to tie an IR LED and driving circuitry there and a fixed logical 1 (or too long) surely will burn it, the manual from wipy or pyboard is not working in my case.
That is, I think is the only pin (tied to the red LED) that can be used with no worry (on the actual hardware) for my PWM, at least at the moment.
e.g.
wipy.heartbeat(False) # disable the heartbeat LED
# Not working for me.
Thanx in advance ..
Junior Vargas
thanx a lot, your fast guidance got me to the answer (on the datasheet), I was not clear about.
May I have another question:
How can I disable the heartbeat for my cc3200-Launchxl board (and the thing can't come to live after a cold reset), cause I'm planning to tie an IR LED and driving circuitry there and a fixed logical 1 (or too long) surely will burn it, the manual from wipy or pyboard is not working in my case.
That is, I think is the only pin (tied to the red LED) that can be used with no worry (on the actual hardware) for my PWM, at least at the moment.
e.g.
wipy.heartbeat(False) # disable the heartbeat LED
# Not working for me.
Thanx in advance ..
Junior Vargas
Re: PWM and Pins
Although your board isn;t a Wipy I beleive as it is the same chip that the wipy module is enabled in the build. In which case the command below maybe what you want.
wipy – WiPy specific features
The wipy module contains functions to control specific features of the WiPy, such as the heartbeat LED.
Functions
wipy.heartbeat([enable])
Get or set the state (enabled or disabled) of the heartbeat LED. Accepts and returns boolean values (True or False).
Re: PWM and Pins
Thanx Neil,
really the image I have compiled came from a different tree than the Wipy, the former was from the CC3200, apparently not all things are in place at this development stage.
I will try the real Wipy (binary or source compiled) version, this could be a remedy.
Thanx a lot.
Junior Vargas.-
really the image I have compiled came from a different tree than the Wipy, the former was from the CC3200, apparently not all things are in place at this development stage.
I will try the real Wipy (binary or source compiled) version, this could be a remedy.
Thanx a lot.
Junior Vargas.-