Morse code: PIC generated with PWM

Test 6. Morse code: PIC generated with PWM

Generating the word PIC in Morse code using PWM module. Generating acoustic signal with PWM was described in previous test.

Interfacing PIC Microcontrollers to Peripherial Devices-0266Interfacing PIC Microcontrollers to Peripherial Devices-0267Interfacing PIC Microcontrollers to Peripherial Devices-0268Interfacing PIC Microcontrollers to Peripherial Devices-0269

Routine del contains nested loop. Two general purpose registers l2 and l3 are decremented. l2 is first cleared and then is decremented in the inner loop with instruction decfsz (decrement f, skip if zero). The loop is executed 256 times. It takes time of 1.024 ms (256 x 4 x 1us).

Interfacing PIC Microcontrollers to Peripherial Devices-0270

Leave a comment

Your email address will not be published. Required fields are marked *