PIC Programming
PIC Programming
Hi
Wy WinterHill fails to start with a "PIC_A not found error - can't continue"
If I run the PIC programmer directly, I get output below, showing PIC_A programmed and verified but then fails the last status check.
Swapping the PIC doesn't fix the issue. If I check with the scope, the only difference seems to be a difference in the signals on SPI0 and SPI6 with SPI0 staying high, but there are no shorts on the line.
Any ideas welcome.
------
PIC_A:
------
Reading chip ID:
DeviceID=750E
Revision=0004
PIC24FJ256GA702 detected
Erasing chip:
Programming:
000000 002000 002800 002900 002A00 002B00 002C00 002D00
002E00 002F00 003000 003100 003200 003300 003400 003500
003600 003700 003800 003900 02AF00
Verifying:
000000 002000 002800 002900 002A00 002B00 002C00 002D00
002E00 002F00 003000 003100 003200 003300 003400 003500
003600 003700 003800 003900 02AF00
*** PIC_A SUCCESS ***
------
PIC_B:
------
Reading chip ID:
DeviceID=750E
Revision=0004
PIC24FJ256GA702 detected
Erasing chip:
Programming:
000000 002000 002800 002900 002A00 002B00 002C00 002D00
002E00 002F00 003000 003100 003200 003300 003400 003500
003600 003700 003800 003900 02AF00
Verifying:
000000 002000 002800 002900 002A00 002B00 002C00 002D00
002E00 002F00 003000 003100 003200 003300 003400 003500
003600 003700 003800 003900 02AF00
*** PIC_B SUCCESS ***
----------------------------------------------------------------------------------------
Checking status:
PIC_A: not programmed or version unknown
PIC_B: version 3v20
Status: 32 (0x20)
----------------------------------------------------------------------------------------
Complete
Wy WinterHill fails to start with a "PIC_A not found error - can't continue"
If I run the PIC programmer directly, I get output below, showing PIC_A programmed and verified but then fails the last status check.
Swapping the PIC doesn't fix the issue. If I check with the scope, the only difference seems to be a difference in the signals on SPI0 and SPI6 with SPI0 staying high, but there are no shorts on the line.
Any ideas welcome.
------
PIC_A:
------
Reading chip ID:
DeviceID=750E
Revision=0004
PIC24FJ256GA702 detected
Erasing chip:
Programming:
000000 002000 002800 002900 002A00 002B00 002C00 002D00
002E00 002F00 003000 003100 003200 003300 003400 003500
003600 003700 003800 003900 02AF00
Verifying:
000000 002000 002800 002900 002A00 002B00 002C00 002D00
002E00 002F00 003000 003100 003200 003300 003400 003500
003600 003700 003800 003900 02AF00
*** PIC_A SUCCESS ***
------
PIC_B:
------
Reading chip ID:
DeviceID=750E
Revision=0004
PIC24FJ256GA702 detected
Erasing chip:
Programming:
000000 002000 002800 002900 002A00 002B00 002C00 002D00
002E00 002F00 003000 003100 003200 003300 003400 003500
003600 003700 003800 003900 02AF00
Verifying:
000000 002000 002800 002900 002A00 002B00 002C00 002D00
002E00 002F00 003000 003100 003200 003300 003400 003500
003600 003700 003800 003900 02AF00
*** PIC_B SUCCESS ***
----------------------------------------------------------------------------------------
Checking status:
PIC_A: not programmed or version unknown
PIC_B: version 3v20
Status: 32 (0x20)
----------------------------------------------------------------------------------------
Complete
Re: PIC Programming
I checked this out further, and it seems to programme both PICs with the I2C address of PIC_B.
Hardware wise, the board looks ok. The only difference I can see is that SS_Y / SPI6_CEO_N on PIC_B has activity, but SS_X / SPI0_CEO_N on PIC_A always stays high during programming. No obvious use of this line in the code.
I can make it work by changing the PIC_A address in the main program to the PIC_B address, not obviously only for one PIC.
Hardware wise, the board looks ok. The only difference I can see is that SS_Y / SPI6_CEO_N on PIC_B has activity, but SS_X / SPI0_CEO_N on PIC_A always stays high during programming. No obvious use of this line in the code.
I can make it work by changing the PIC_A address in the main program to the PIC_B address, not obviously only for one PIC.
Re: PIC Programming
I'll have a look at this as soon as I can get to my WinterHill.
Brian
Brian
Re: PIC Programming
Pin 24 on each PIC tells it whether to be A or B.
Check the values on the PIC pin.
Pin 24 on PIC_A should be pulled low by R31.
Pin 24 on PIC_B should be pulled high by R39.
Also check that R32 is fitted and R33 is not.
Brian
Check the values on the PIC pin.
Pin 24 on PIC_A should be pulled low by R31.
Pin 24 on PIC_B should be pulled high by R39.
Also check that R32 is fitted and R33 is not.
Brian
Re: PIC Programming
Perfect thanks, Brian. R31 was O/C so I can understand now what was wrong as I couldn't quite follow the excellent code.
Thanks for the quick help! Stephen
Thanks for the quick help! Stephen
Re: PIC Programming
Jolly good.
The NIMs receive the same signal (AS0) as the PICs to tell them which one to be, so I was puzzled as to how the NIM and the PIC could be different. As I recall, the NIMs have a weak pull down and the PICs have a weak pull up, so maybe the signal was hovering in the middle somewhere and the two devices have different thresholds.
Brian
The NIMs receive the same signal (AS0) as the PICs to tell them which one to be, so I was puzzled as to how the NIM and the PIC could be different. As I recall, the NIMs have a weak pull down and the PICs have a weak pull up, so maybe the signal was hovering in the middle somewhere and the two devices have different thresholds.
Brian