From: Will M. <wm-...@sw...> - 2013-01-29 12:51:48
|
Hi All, I'm attempting to use the GPIO pins on the Raspberry Pi to program a PIC24FJ32GB004, and struggling. I've had some success, but I can only clock out 0's from the Visi register (see note below). I am hoping that someone on here may be interested in my goal enough to lend me their knowledge and perhaps try running the code on their Pi to program a chip? Any comments on what may be wrong or ways to test further would be appreciated! The code is very basic and hacked together, it's C++ and easy enough to read. I've compared with the usbpicprog code and I can't see any noticeable differences. I'll post more details if there's anyone interested. Thanks, Will McElderry. NB: I *believe* I am clocking out zeros from the register as PGD seems to accept current when the PIC should be transmitting data - indicating the PIC is intentionally holding the ping low. This was a fortuitous discovery thanks to only having access to an oscilloscope with one channel, and using a r/2r ladder to allow monitoring 3 pins at the same time. When PGD is not connected to either zero or one the output voltage on the channel changes noticeably, a state I have been able to induce intentionally by sending invalid commands to the PIC, or not requesting clocking out of the Visi register, but asking the Pi to try and read from the PGD pin. |