steve langner
Member
Just tested some inexpensive PIC16F876A micros imported from China. So in each case I used the code below to put all the outputs high. I used a PIC Kit K150 programmer to program the chips, and in every case it confirmed "Program completed". And of course the Oshonsoft simulator showed all the outputs high (ON). However, in fact none of the output pins on the chips themselves went high, and a voltmeter reading on all showed about 0.9 volt. I then modified the code to switch all outputs low. Measured voltages descended to about 0.5.
I'm quite inexperienced with coding and micros, by the way, so my question to you kind folks is : are the chips dud, or is my code wanting in some respect?
Define CLOCK_FREQUENCY = 4 MHz
TRISB = %00000000
TRISC = %00000000
RB = %00000000
RC = %00000000
AllDigital
main:
RB = %11111111
RC = %11111111
Goto main
End
Define CLOCK_FREQUENCY = 4 'MHz
TRISB = %00000000
TRISC = %00000000
RB = %00000000
RC = %00000000
AllDigital
main:
RB = %11111111
RC = %11111111
Goto main
End
I'm quite inexperienced with coding and micros, by the way, so my question to you kind folks is : are the chips dud, or is my code wanting in some respect?
Define CLOCK_FREQUENCY = 4 MHz
TRISB = %00000000
TRISC = %00000000
RB = %00000000
RC = %00000000
AllDigital
main:
RB = %11111111
RC = %11111111
Goto main
End
Define CLOCK_FREQUENCY = 4 'MHz
TRISB = %00000000
TRISC = %00000000
RB = %00000000
RC = %00000000
AllDigital
main:
RB = %11111111
RC = %11111111
Goto main
End