Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC 16F877A

Status
Not open for further replies.

Eric_O

Advanced Member level 4
Joined
May 31, 2020
Messages
104
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Activity points
996
Good evening,
Do some body know, or have, a code, a subroutine in MikroC in order to test rapidly the availability of the chip. In others word is there a code which test the PIC 16F877.
Probably, after many experiments and reloads of the hex code in the memory, the PIC runs strangely. Before my routines and code did run properly (PWM with LED and buzzer, LED and switches, servomotors, joystick and LEDs ...). But know each code runs partially, not properly.
i use MikroCPro For PIC. I erased many times the memory, I reloaded compiled source, hex file again ... But still same. 🤔
Merci beaucoup for help !
Éric
 

Title says PIC 16F877A but post says PIC 16F877 - I guessed at PIC16F877A

Did you disable Watchdog Timer in configuration settings?

Simple LED flash project attached...
 

Attachments

  • pintest.zip
    10.8 KB · Views: 54

Title says PIC 16F877A but post says PIC 16F877 - I guessed at PIC16F877A

Did you disable Watchdog Timer in configuration settings?

Simple LED flash project attached...

Dear HexReader,
Sorry, yes it is PIC 16F877A.
With MikroC For PIC :
1) Build > Build -> Finished successfully.
2) Build > Build + Program -> MikroProg Suite window :
Oscillator : HS
-> My oscillator frequency is 4 MHZ. Oscillator should be set up to XT ?
-> Watchdog Timer : Disabled.
When I click on Verify button I get « There are no difference. Verification SUCCESS »
When I switch Oscillator to XT and click on Verify button I get « Differences found ! Config. Word(s) : 1 Error(s) »
While waiting your answer I will have a look and runs your attached zip file.
Merci beaucoup !
 

Yes, XT mode for 4MHz 2-pin crystal.

Updated project attached - 4MHz crystal, all ports and half second on, half second off
 

Attachments

  • pintest.zip
    11.6 KB · Views: 42

Provided the configuration bits are set properly and dual-purpose pins are made digital outputs it should work but it doesn't really test the IC, it just gives an idea of whether it can run or not.

If you want better testing you need to scan through the memory and keep a CRC count of locations then pass values through the registers and read/write all the RAM locations. It can be tricky with Harvard architecture because program memory and user memory are not mapped in the same way but a good degree of confidence can still be achieved.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top