Discussion in "Project Help" started by    eddieprice    Jan 12, 2018.
Fri Jan 12 2018, 10:02 pm
#1
I am using a 16F84A for the first time and am having trouble with the oscillator. I am using a 4 MHz xtal with 22pf capacitors as shown in the PIC16F84A datasheet. I have used MPLAB IDE V8.91 to write the program. The simulation works fine, but the circuit doesn't. I have a small didgital oscilloscope and I would assume that I should be able to observe a square wave across the xtal - but there is nothing. This is my configuration code:-
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
Any suggestions would be much apprciated.
Sat Jan 13 2018, 12:19 am
#2
Sometimes the Configuration word has to be programmed separately.
Check your programming software to make sure the
Configuration word is being set correctly.

Check the reset pin is high after a short delay.
Check all your connections again.. and carefully.

Write a simple flashing LED program, does it work using
the R/C oscillator ?

FYI.. the 16F84A is now very old, and expensive, due to rarity value.
It is messy to program in assembly and has too little memory
to do much in C.
Consider moving to a newer device.



[ Edited Sat Jan 13 2018, 08:26 am ]

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

carpinteyrowrl
Fri Apr 19 2024, 02:51 pm
DonaldJAX
Fri Apr 19 2024, 01:08 pm
Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am
utaletxcyw
Wed Apr 17 2024, 10:21 am