Well, a third PIC shows the exact same behavior. It will program and verify fine but will not execute code. I changed the resonator, same result. Will try a new pcb next.
Well, a third PIC shows the exact same behavior. It will program and verify fine but will not execute code. I changed the resonator, same result. Will try a new pcb next.
New pcb, new PIC, same result. Only populated the board with a 5v regulator and caps, plus resonator and PIC. Layout is good. Can program, verify, read back, erase etc etc. Again, resonator is showing clean 20mhz waveform, it just will not execute the code.
Try this please;
Also check if MCLR is connected to VCC. I don't see the configuration bits of your code!Code:loop1: LATB.2 = 1 pause 100 LATB.2 = 0 PAUSE 100 goto loop1
Last edited by gadelhas; - 8th August 2012 at 22:32.
Thanks and Regards;
Gadelhas
Confusing since it worked on the 18 pin but I would also try configuring in the order shown in Example 10-2 of the data sheet:
Code:PORTA = %00000000 ' Turn off all PORTA PORTB = %00000000 ' Turn off all PORTB ADCON1 = %01111000 ADCON2 = %10000111 TRISA = %11100111 TRISB = %11000011
Louie
Let's look at the code that works. Maybe theres something you left out...
Dave Purola,
N8NTA
EN82fn
The 20-pin version has separate AVSS and AVDD pins.
Did you connect them to VSS and VDD?
DT
Fixed!
So it would appear if you use the auto insert serial number feature it changes your config bits during programming. This applies to the U2 programmer software. Uncheck this feature, problem solved, and the design functions just fine.
Bookmarks