VOOZH about

URL: https://www.javacodegeeks.com/2016/04/using-raspberry-pi-program-microchip-pic-pic24-device-via-icsp.html

⇱ Using the Raspberry Pi to program a Microchip PIC (PIC24) device via ICSP - Java Code Geeks


Why would someone want to do that? Well, basically for two reasons. First, the classic: β€œthis should be possible” – so lets try it, spend the better part of three weekends and some nights to finally get it working. Might sound stupid, but to me, this is still the best way to really learn a technology or technical topic. Starting with basic C++ skills, I learned a lot about PIC assembler (yep, ICSP for PICs is basically sending a bunch of op codes to the device), PIC memory layout and of course PIC ICSP and controlling GPIOs of the Raspberry Pi.
 
 
 
 
πŸ‘ Bildschirmfoto 2016-04-11 um 17.25.22

What’s the second reason? In my case, I have a PIC connected to the Pi anyway, talking to each other via RS232 – so I figured I could use the spare pins on the connector to assign some GPIOs to the appropriate PINs on the PIC and I don’t need a second connector for ICSP, the board is quite full anyway. Also I can update the firmware without having to build a bootloader (which is a topic on its own).

πŸ‘ 2016-02-27 20.49.21

I case you’re curious, the whole project will eventually be a driver board for my 3 axis CNC. Currently I have a PC + Arduino + GBRL-Shield, but I’m not happy with the setup. So I’m planning on building a web based controller on the Pi. This way I can control the machine using a cheap Galaxy Tab A or my mobile Phone. Also I can directly upload the G-Code (produced by Fusion 360 – AWESOME!) from my laptop – either directly or via my NAS or Dropbox or the like (both machines are quite a bit apart).

OMG Andy, all this has already been built?! Yes – it is still fun to try it yourself and learn a whole lot new :-)

Because I found a lot of inspiration and help in the projects of others, I tried and document my code quite well a bit. Also I added a bit of a description on how it all works – so if you’re into ICSP / PICs / GPIOs have a look here: OpenCobra on GitHub

Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Thank you!

We will contact you soon.

πŸ‘ Photo of Andreas Haufler
Andreas Haufler
April 13th, 2016Last Updated: April 12th, 2016
0 326 2 minutes read
Back to top button
Close
wpDiscuz