h230600n Assignment 1
h230600n Assignment 1
h>
// Configuration bits
void delay_100ms(void) {
TMR0L = 0xB0;
// Main function
void main(void) {
while (1) {
return;
}
; Configuration bits
; Delay subroutine
DELAY_100MS
MOVLW D'156' ; Load 156 into WREG (20 MHz / 256 = 78.125 kHz, 1/78.125 kHz = 12.8 us, 100 ms
/ 12.8 us = 7812.5, 7812.5 / 50 = 156.25)
DELAY_LOOP
; Main program
LOOP
END