-
Notifications
You must be signed in to change notification settings - Fork 5
Lab 3
The PWM signal is a periodic digital signal. It is defined by 2 main parameters :
- The duration at high state
$T_{on}$ . This value can be set using the register CMP. - The period of the PWM
$T$ . This value can be set using the register period
The ratio
Both CMP and period registers are dimensionless. They set corresponding durations as number of clock ticks driving the PWM. It is therefore necessary to connect a clock component to the PWM component in the TopDesign (if not done by default). It is the same principle as
Timer.
They might be 2 reasons for this :
- Each duty cycle value corresponds to a given servo motor position. It is thus necessary to change the value of
$T_{on}$ (thus CMP) while code is running in order to see the servo moving. - Servos expect specific parameters for the PWM signal. Please check the datasheet of the given servos.
... like this :

This could be due to multiple errors :
- Missing USB-UART converter drivers : you need to download and install the drivers for the LC234X. Otherwise, it will not be recognized by your computer. When it's properly detected, your should see a serial port on a given COM.

The assigned COM here is COM4, but could be different from yours. It's easy to check: it should disappear/reappear when you unplug/replug the$\mu$ -USB. - Wrong COM or baudrate in Termite settings : check all parameters have been properly set in Termite settings. The COM should be the same as in device manager, i.e., COM10 should be changed to COM7 in our case.
\ - Wrong TX/RX connection : make sure the converter's TX line is connected to the PSoC's RX line (and vice versa). Must be consistent with the pin on the TopDesign as well.\
You might have brought a
\
A post from Stack Exchange however indicates that cables allowing data transfer have 2 physical characteristics :
- Longer edge pins
- Extra grooves above all pins.
It is illustrated with a photo in the link above. The best way to know is still to test it before the lab !