winheartz
Posts: 2
Joined: Thu Oct 12, 2017 9:52 am

How to shrink my pi3 program into a single chip?

Thu Oct 12, 2017 10:03 am

I would like to shrink my pi3 program into a simple chip/microcontroller. Can any one tell if this can be done?

I see that such a process is available for moving Arduino programs to single microcontroller.

scotty101
Posts: 3958
Joined: Fri Jun 08, 2012 6:03 pm

Re: How to shrink my pi3 program into a single chip?

Thu Oct 12, 2017 12:16 pm

What type of program is it?

Depending on the type of thing you are doing you may find that the microprocessor/controller doesn't have enough throughput/memory space to deal with the program. Converting the program may rely on you making some optimisations/simplification to the code for example floating point mathematics aren't directly supported on many microprocessors.

If it is a simple program written in C then you might be able to just change a few function calls and the code will work on a platform like arduino or similar microcontroller.

More information from you required.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

User avatar
rpdom
Posts: 17173
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to shrink my pi3 program into a single chip?

Thu Oct 12, 2017 12:19 pm

That somewhat depends on the complexity of your program and what interfaces it uses.

Moving from an Arduino (a high end microcontroller with a fixed set of programming options) to a lower powered microcontroller may be easy, but moving from a full computer like the Pi may be a bit harder or even not possible.

What does your program do and what language is it written in?

winheartz
Posts: 2
Joined: Thu Oct 12, 2017 9:52 am

Re: How to shrink my pi3 program into a single chip?

Thu Oct 12, 2017 1:45 pm

I'm new to using Raspberry Pi. Just started with my first program. My program is a basic LED blinking program written in python script

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: How to shrink my pi3 program into a single chip?

Thu Oct 12, 2017 1:52 pm

winheartz wrote:
Thu Oct 12, 2017 1:45 pm
I'm new to using Raspberry Pi. Just started with my first program. My program is a basic LED blinking program written in python script
And what is the 'simple chip' that you hope to move that code to?

You could do something similar with a micro:bit that runs the micropython interpreter.

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: How to shrink my pi3 program into a single chip?

Thu Oct 12, 2017 2:01 pm

"Arduino" covers a lot, but many projects can be reduced to using a single bare ATmega328 chip, or the dinky 8 pin Attiny85

On ARM/pi you could use a Pi Zero to reduce size / chip count...

But you need to tellus what your project is, and which features of the pi3 you're using.

<grumpy old man talk:>
As an aside it does make me laugh (or groan) seeing "blinky LED" projects using a CPU chip which contains 100,000 transistors :shock: :lol:
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
rpdom
Posts: 17173
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to shrink my pi3 program into a single chip?

Thu Oct 12, 2017 2:21 pm

mikerr wrote:
Thu Oct 12, 2017 2:01 pm
<grumpy old man talk:>
As an aside it does make me laugh (or groan) seeing "blinky LED" projects using a CPU chip which contains 100,000 transistors :shock: :lol:
555 or LM3909? Or do you prefer a handful of transistors, capacitor and resistors?

User avatar
piglet
Posts: 915
Joined: Sat Aug 27, 2011 1:16 pm

Re: How to shrink my pi3 program into a single chip?

Thu Oct 12, 2017 2:40 pm

Reminds me of this - he bought an IBM Z890 mainframe and ran Lynx text based web browser on it! An atom bomb to crack a nut.

https://blog.adafruit.com/2016/04/05/ib ... mainframe/

https://www.youtube.com/watch?v=45X4VP8CGtk

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to shrink my pi3 program into a single chip?

Fri Oct 13, 2017 10:51 pm

piglet wrote:
Thu Oct 12, 2017 2:40 pm
Reminds me of this - he bought an IBM Z890 mainframe and ran Lynx text based web browser on it! An atom bomb to crack a nut.
I've met that lad that bought a mainframe and installed it in his basement. He's now got a job working for IBM in Poughkeepsie on the next generation of mainframes.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to shrink my pi3 program into a single chip?

Sat Oct 14, 2017 12:17 pm

Do you mean this lad?

Here's What Happens When an 18 Year Old Buys a Mainframe? The story of Connor Krukosky:

https://www.youtube.com/watch?v=45X4VP8CGtk

Damn impressive.

Edit: Sorry, just noticed you included that link in your post already.

A friend told me that back in the 1970's his High School acquired some old mini computer or mainframe. I forget what exactly. He was all set to try and get it working. He was heart broken to find, on returning from holiday, that it had been stripped down for parts.
Last edited by Heater on Sat Oct 14, 2017 12:34 pm, edited 1 time in total.
Memory in C++ is a leaky abstraction .

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to shrink my pi3 program into a single chip?

Sat Oct 14, 2017 12:22 pm

winheartz,

If you want to continue to use Python and your programs are not getting too big you might like to look at Micro-Python.
https://micropython.org/

There is the original PyBoard micro-controller system. And as noted above Micro-Python is also usable on the Micro:Bit and a few other boards if I remember correctly.
Memory in C++ is a leaky abstraction .

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to shrink my pi3 program into a single chip?

Sat Oct 14, 2017 12:30 pm

mikerr,
As an aside it does make me laugh (or groan) seeing "blinky LED" projects using a CPU chip which contains 100,000 transistors
Blinking a LED is the traditional way to first verify that your hardware setup and software tool chain is working properly. It's the "Hello World" of embedded systems.

Blinking a LED is a respectable way for a beginner to start experimenting with any new hardware and programming language. Especially if they have never programmed before.

What was the first thing I did when starting to get familiar with FPGAs and hardware design with Verilog this year, using a chip with 22000 Logic Cells? I got it to blink a LED.

Laughing or groaning is not appropriate.
Memory in C++ is a leaky abstraction .

Return to “Automation, sensing and robotics”