Programming PICAXE and BASIC Stamp microcontrollers

Started by Peter Percival January 4, 2018
Does anybody know if PICAXE or BASIC Stamp can be programmed in 
assembler or Forth (or anything but BASIC!)?
-- 
-- 
Do, as a concession to my poor wits, Lord Darlington, just explain
to me what you really mean.
I think I had better not, Duchess.  Nowadays to be intelligible is
to be found out. -- Oscar Wilde, Lady Windermere's Fan

On 1/4/2018 2:42 PM, Peter Percival wrote:
> Does anybody know if PICAXE or BASIC Stamp can be programmed in > assembler or Forth (or anything but BASIC!)?
I'd be interested to know what you NEED and CAN'T do in BASIC and the BASIC stamp (note the word BASIC in the name) hardware supports that you COULD do with greater return on investment in Forth? The answer to your question has to be yes. Program the chip directly in binary.
mike wrote:
> On 1/4/2018 2:42 PM, Peter Percival wrote: >> Does anybody know if PICAXE or BASIC Stamp can be programmed in >> assembler or Forth (or anything but BASIC!)? > > I'd be interested to know what you NEED and CAN'T do in BASIC and the > BASIC stamp (note the word BASIC in the name) hardware > supports that you COULD do with greater return on investment in Forth?
I accept that whatever BASIC Stamp can do, it can be made to do it using BASIC and nothing else will ever be _required_. But I am a hobbyist (hiss! boo!) and I want to program in something... um... more interesting than BASIC. I shall be doing it with PICAXE (not BASIC Stamp, it seems) just for fun. Fun? FUN? Are you mad Percival? Maybe I'll get a BASIC Stamp as well, if Xmas hasn't completely emptied the piggy bank.
> The answer to your question has to be yes. Program the chip > directly in binary.
-- Do, as a concession to my poor wits, Lord Darlington, just explain to me what you really mean. I think I had better not, Duchess. Nowadays to be intelligible is to be found out. -- Oscar Wilde, Lady Windermere's Fan
On Thursday, January 4, 2018 at 4:43:07 PM UTC-6, Peter Percival wrote:
> Does anybody know if PICAXE or BASIC Stamp can be programmed in > assembler or Forth (or anything but BASIC!)?
No, but the underlying Microchip PIC can. I'd just go that route if you're interested in Assembly or some compiled language.
On 1/5/2018 7:05 AM, Peter Percival wrote:
> mike wrote: >> On 1/4/2018 2:42 PM, Peter Percival wrote: >>> Does anybody know if PICAXE or BASIC Stamp can be programmed in >>> assembler or Forth (or anything but BASIC!)? >> >> I'd be interested to know what you NEED and CAN'T do in BASIC and the >> BASIC stamp (note the word BASIC in the name) hardware >> supports that you COULD do with greater return on investment in Forth? > > I accept that whatever BASIC Stamp can do, it can be made to do it using > BASIC and nothing else will ever be _required_. But I am a hobbyist > (hiss! boo!) and I want to program in something... um... more > interesting than BASIC. I shall be doing it with PICAXE (not BASIC > Stamp, it seems) just for fun. Fun? FUN? Are you mad Percival?
You can program your PC in any language you want. That could keep you busy for an eternity. The problem with a microcontroller is not the code...it's getting it into the microcontroller and having some result come out. Most effort goes into making that simpler, not more complex and lower level. Do you really want to write the machine code that implements a USB port? OR a serial port? Or a display device? Do you really want to build a programmer that can put the bits into a blank device at the lowest level? A standardized platform comes with lotsa pre-configured/pre-debugged callable routines for all that. One of the interesting things about PICBasic is that it's written in PICBasic. I've actually modified the compiler to change the way the serial port works for IR communication. It doesn't have to be boring. Starting with something like an Arduino might maximize your fun/(effort+$)ratio. And you might end up with some gizmo you can use. https://playground.arduino.cc/CommonTopics/ForthOnArduino https://www.ebay.com/itm/USB-Nano-V3-0-ATMEGA328P-CH340G-5V-16M-Microcontroller-Board-Kit-For-Arduino/112162303620 Are we having fun yet?
> > Maybe I'll get a BASIC Stamp as well, if Xmas hasn't completely emptied > the piggy bank. > >> The answer to your question has to be yes. Program the chip >> directly in binary. >
On 1/5/2018 10:59 PM, mike wrote:
> On 1/5/2018 7:05 AM, Peter Percival wrote: >> mike wrote: >>> On 1/4/2018 2:42 PM, Peter Percival wrote: >>>> Does anybody know if PICAXE or BASIC Stamp can be programmed in >>>> assembler or Forth (or anything but BASIC!)? >>>
And furthermore, if you want something completely different, google 'MIT App inventor' and 'write' some code for your android smartphone that might even be able to do something useful.
Am Thu, 4 Jan 2018 22:42:59 +0000 schrieb Peter Percival
<peterxpercival@hotmail.com>:

>Does anybody know if PICAXE or BASIC Stamp can be programmed in >assembler or Forth (or anything but BASIC!)?
If you're talking about the original Basic Stamp <http://www.mystrobl.de/Plone/basteleien/microcontroller/basicstamp/dsc-4339.jpg/view> then no, you can't. Beeing based on a OTP (one time programmable) 16C56, <http://www.microchip.com/wwwproducts/en/PIC16C56>, its interpreter was fixed in 1 K words of program memory and isn't rewritable. Twenty years ago, I had a lot of fun playing around with a handfull of PIC 16F84, see for example <http://www.mystrobl.de/ws/pic/mm47/index.htm>. This specific piece was done using a PICBASIC/ Assembler mixture, using the commercial compiler from http://melabs.com/ Currently, I'd recommend buying a PICkit 2 or 3 original or clone, a handfull of for example PIC 12F840, PIC10F320 and start with the free/demo version of Microchips XC8 (-> http://www.microchip.com/mplab/compilers) This recommendation is based on an assumption that you really want to start at the bare metal. The following gimmick was done using two cheap 10f320 and a short C program compiled by the aforementioned xc8 compiler. <http://www.mystrobl.de/Plone/basteleien/10f320/duet.mp4> Another example: http://www.mystrobl.de/Plone/basteleien/10f320/stridulator/stridulator.mp4 -- Wir danken f&#2013266172;r die Beachtung aller Sicherheitsbestimmungen
On Thu, 4 Jan 2018 22:42:59 +0000
Peter Percival <peterxpercival@hotmail.com> wrote:

> Does anybody know if PICAXE or BASIC Stamp can be programmed > in assembler or Forth (or anything but BASIC!)?
Flash Forth looks robust, and the core occupies ~8KB (in the Atmel chip we are using, PICs should be similar). It supports incremental compilation on target, high level interrupt handlers, and an assembler: flashforth.com To get going you will need to be able to flash the core into your microchip processor. Should be a good basis for exploring how micros work, and big enough for large projects. Jan Coombs --