. .

Thread: Raspberry Pi

Page 5 of 5 FirstFirst ... 345

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I had a bit of a leap backwards when I discovered the STM32F103 doesn't take ARM instructions, it's all THUMB-2 and relative, icky pooh, so I'm now writing in C.

    I had a bit of a leap forward when I discovered the port bit set reset register GPIOx->BSRR

    It's a 32 bit register for a 16 bit port, set a bit in the top half and you set a pin, set a bit in the bottom half and you reset the pin. Fiendishly useful if you are sharing the port with other peripherals you don't want to touch.

    The port control registers come in Low and High GPIOx->CRL GPIOx->CRH with 4 bits per port which is conveniently one digit in Hex so you can see what you are getting in the way of inputs and outputs at a glance. For example:-

    GPIOB->CRL = 0x22222222; Gets you 8 push pull outputs b0-7 on Port B

    Much easier to see what is going on a glance.

    I have a rudimentary 4 axis stepper written, now I need to get data in to it. I've bought a 4Gb micro SD card. If I can dump the entire cut into it then I can stop worrying about drip feeding and comms errors, just have it send reports on a timer tick so I can do fancy graphics on the PC. Watch out, SD cards come with a "Class" number which is the transfer rate in MHz, if you don't see a Class number assume it's slow, I got a Class 4.

  2. Running my Pi(s) on 16Gb class 10s now (yes my second Pi arrived), courtesy of SavaStore, cheap and improves performance and memepory issues are a thing of the past. 2.9Gbyte for the OS and 12Gb+ for a step buffer - can't see any job needing more than that! But other things are taking my time now so this is stalled a while.

  3. #3
    Took me a while but I now have it stepping

    Not usefully stepping, just moving back and forth in 4 axes at 4 different speeds, over and over again. Looking good.

    I am running everything on one timer interrupt. The interrupt collects 4 absolute co-ordinates from the buffer, along with a couple of speeds. It moves there. It comes back for more. Simples.

    I was thinking to make the Z and W axes optional but there is no point it's so blooming fast. 40kHz step rates look easy, I could probably wind it up to 70kHz mid line. I usually run at 3kHz top whack.

    These ARM Coretex processors may have a bit of a vertical learning curve but are well worth the effort. They have so many built in goodies I am barely scratching the surface.

  4. :) The only progress I have made is to put Pi #1 into a nice CNC'd case from Pimoroni

    Click image for larger version. 

Name:	Pimoroni Pi Case.jpg 
Views:	723 
Size:	237.1 KB 
ID:	7076

  5. #5
    Quote Originally Posted by irving2008 View Post
    :) The only progress I have made is to put Pi #1 into a nice CNC'd case from Pimoroni

    Click image for larger version. 

Name:	Pimoroni Pi Case.jpg 
Views:	723 
Size:	237.1 KB 
ID:	7076
    That is sexy !

    Fiction is far more plausible when wrapped around a thread of truth

    Nothing great was ever achieved without enthusiasm.
    Ralph Waldo Emerson


  6. #6
    Quote Originally Posted by irving2008 View Post
    :) The only progress I have made is to put Pi #1 into a nice CNC'd case from Pimoron
    Does that come in My Little Pony?
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	stm.jpg 
Views:	22380 
Size:	438.1 KB 
ID:	7077  

Page 5 of 5 FirstFirst ... 345

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. cnc print a raspberry
    By george uk in forum General Discussion
    Replies: 7
    Last Post: 13-06-2014, 01:13 PM
  2. Raspberry Pi as a PC + Mach3 .. very possible
    By Fivetide in forum General Electronics
    Replies: 2
    Last Post: 05-09-2012, 11:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •