Mr.Cool
Advanced Member level 2

oscilloscope pic resonator troubleshoot
i am trying to make an LED blink as my first program.
my editor is: Microcode Studio
compiler: PIC Basic Pro 2.42
programmer: picall v0.013d
in microcode studio i loaded up the "blink.bas" as found in the pic basic pro samples directory. the program is about 6 lines. there are 2 instances where the command "pause" are used. i reasoned this is how the LED knows how long to turn on and off for. so i changed the line
from: PAUSE 500
to: PAUSE 3000
this will cause the LED to turn on and off for 3 seconds instead of 500mS. slowing it down allows me to verify voltage using my voltmeter, 500mS is too fast.
then i select the PIC chip i am using, a 16F877, and hit compile. within the picall software i load the compiled hex file and program my chip with success. verified OK.
i put my microchip in the circuit. the circuit on my bread board consists of 2 resistors, reset button, 20 MHz crystal, LED, and 2 caps, and some wires. the LED is connected from PORTB.0 to ground with a resistor.
when i apply power to the circuit nothing happens!
i checked the voltages and all seem proper. my supply with no load is 5.35v, when in circuit it drops to 4.65V. since the microchip's datasheet says it can operate from 2V-5.5V, i assume that this is OK.
i measure voltage at PORTB.0 to see if i can see the voltage, but it stays constant at 0.3v. infact, all of PORTB pins are at this constant voltage. the LED works fine, i have tested it.
what can be going wrong??? is it necessary for me to somehow tell the PIC chip that i am using a 20MHz crystal??? because i did not add this information in the code.
Mr.Cool
i am trying to make an LED blink as my first program.
my editor is: Microcode Studio
compiler: PIC Basic Pro 2.42
programmer: picall v0.013d
in microcode studio i loaded up the "blink.bas" as found in the pic basic pro samples directory. the program is about 6 lines. there are 2 instances where the command "pause" are used. i reasoned this is how the LED knows how long to turn on and off for. so i changed the line
from: PAUSE 500
to: PAUSE 3000
this will cause the LED to turn on and off for 3 seconds instead of 500mS. slowing it down allows me to verify voltage using my voltmeter, 500mS is too fast.
then i select the PIC chip i am using, a 16F877, and hit compile. within the picall software i load the compiled hex file and program my chip with success. verified OK.
i put my microchip in the circuit. the circuit on my bread board consists of 2 resistors, reset button, 20 MHz crystal, LED, and 2 caps, and some wires. the LED is connected from PORTB.0 to ground with a resistor.
when i apply power to the circuit nothing happens!
i checked the voltages and all seem proper. my supply with no load is 5.35v, when in circuit it drops to 4.65V. since the microchip's datasheet says it can operate from 2V-5.5V, i assume that this is OK.
i measure voltage at PORTB.0 to see if i can see the voltage, but it stays constant at 0.3v. infact, all of PORTB pins are at this constant voltage. the LED works fine, i have tested it.
what can be going wrong??? is it necessary for me to somehow tell the PIC chip that i am using a 20MHz crystal??? because i did not add this information in the code.
Mr.Cool