EMC2 running on Raspberry Pi?
- mhaberler
- Offline
- Moderator
- Posts: 197
- Thank you received: 11
This is the rtos-integration-preview3 branch git code; this is all your work . The only addition I made is the hal spi driver for the PIC32 board. I will post the code once I am done with the cleanups.
well, I'm very interested to see how you did that; if only to help others going for similar ventures.
Regarding miniemc2, I have only taken the web-interface and made it run on the latest code. It's a bit of a kludge, the author made some changes to shcom.cc, and I'm not sure if it is the "right" way of doing it.
I think linuxcnc would profit from becoming a tad more web-friendly, and if we have at least a branch, if not merged, with a way demonstrating how this can be done it would be of value to others.
regards,
Michael
Please Log in or Create an account to join the conversation.
- kinsa
- Offline
- Junior Member
- Posts: 39
- Thank you received: 2
Please Log in or Create an account to join the conversation.
- mhaberler
- Offline
- Moderator
- Posts: 197
- Thank you received: 11
- Michael
Please Log in or Create an account to join the conversation.
- kinsa
- Offline
- Junior Member
- Posts: 39
- Thank you received: 2
A simple HAL SPI driver for testing is included in the source page.
Please Log in or Create an account to join the conversation.
- mhaberler
- Offline
- Moderator
- Posts: 197
- Thank you received: 11
I have documented the PIC32 expnasion board here: code.google.com/p/picnc/
A simple HAL SPI driver for testing is included in the source page.
great - that looks quite solid
out of curiosity: do you have rough timings for the SPI communication? just to get a feel which delays we're looking at
- Michael
Please Log in or Create an account to join the conversation.
- kinsa
- Offline
- Junior Member
- Posts: 39
- Thank you received: 2
The SPI clock can go up to 32 MHz. I haven't tested this as this is beyond the capability of the PIC32 chip. Maybe an FPGA board can handle it.
Please Log in or Create an account to join the conversation.
- kinsa
- Offline
- Junior Member
- Posts: 39
- Thank you received: 2
Please Log in or Create an account to join the conversation.
- mungkie
- Offline
- Premium Member
- Posts: 104
- Thank you received: 6
I have documented the PIC32 expnasion board here: code.google.com/p/picnc/
A simple HAL SPI driver for testing is included in the source page.
I am finally getting round to looking at linuxcnc on the rpi again and spent 2 or 3 hours yesterday trying to select a suitable mcu for interfacing over spi, if only I had checked your work first, looks like you selected the ideal one and have done all the hard work (if only you had used a dev board with the DIP package chip, I would have saved 3 hours).
PIC's seem to have all the features I decided were necessary: spi dma, higher clock speed, available in DIP pakage, and under £3 per chip.
After messing with the atmega I decided it was probably a dead end and dma is probably a must have for the mcu.
PIC seem to have two nice cheap options with dma in DIP package
PIC18F26J11 @ £2.02
PIC32MX130F064B @ 2.45
I am not sure about supporting components yet, this weekend I should workout requirements for a breadboard layout, maybe make an order for components soon (rs seem to have a £20 minimum order now )
www.eevblog.com/forum/microcontrollers/pic32mx-quickstart/ , and www.ccsinfo.com/forum/viewtopic.php?t=47347 looks like my study material
I get the feeling linuxcnc is possibly getting towards a decent working system on the rpi, the PIC looks very promising to me after failure with the other attempts I have made.
I have not really looked at your code, and I am not really a good enough coder to understand anyways, but I assume it uses spi dma, any quick description of what the code does would be helpful.
Thanks for sharing all your hard work kinsa and I hope it encourages others to have a go at hacking on the PIC and rpi and getting some tests done and improving linuxcnc.
Please Log in or Create an account to join the conversation.
- kinsa
- Offline
- Junior Member
- Posts: 39
- Thank you received: 2
I am finally getting round to looking at linuxcnc on the rpi again and spent 2 or 3 hours yesterday trying to select a suitable mcu for interfacing over spi, if only I had checked your work first, looks like you selected the ideal one and have done all the hard work (if only you had used a dev board with the DIP package chip, I would have saved 3 hours).
The chip I used was a left over from my previous experiment (rt-8p8c). I completely missed the DIP requirement, once you start doing SMD stuff you'll never look back
I'm actually planning to build a polulo stepstick interface, similar to Sanguinololu, on top of picnc. I think I'll design a new board using a DIP package instead, most likely a PIC32MX150F128 (thanks to your research ) as the current firmware is using a serial bootloader which already occupies ~10kb.
The existing code should be easy to port over; the only downside to using a 40MHz part would be a lower maximum stepgen frequency (40kHz instead of 80kHz).
A stripboard would be preferable due to higher clock frequency.I am not sure about supporting components yet, this weekend I should workout requirements for a breadboard layout, maybe make an order for components soon (rs seem to have a £20 minimum order now )
I think linuxcnc + RPi would serve the reprap and shapeoko crowd well.
Cheers!
Please Log in or Create an account to join the conversation.
- otto_pjm
- Offline
- Junior Member
- Posts: 28
- Thank you received: 0
I haven't checked in for a few months, it looks like a lot of progress has been made to get LinuxCNC going on ARM / RPi. I'm curious if it would be helpful to try and get the code working on a bit faster ARM board, something like the pcDuino (1Ghz but no SPI unfortunately) or a Odroid-U2 (1.7Ghz quad core, it seems that SPI is via a USB expansion, not sure if that would work). This Ordoid has SPI on a 50 pin header but it's not out yet and it's 4x what an RPi cost, ouch
So, any advice, is it worth pursuing any of these options or is the RPi the best way to test the code? Also are any PICnc boards available? I see the files and BOM are posted, but that's quite a bit beyond my soldering abilities with the SMD PIC.
Thanks for all the great effort.
Pete
Please Log in or Create an account to join the conversation.