By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,829 Members | 1,798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,829 IT Pros & Developers. It's quick & easy.

Alterative to Basic for microcontroller

P: n/a

I'm an Electronics student in college and I'm currently working on a
project. I was given a circuit diagram for my project, from which I had to
design a printed circuit board to be sent off and manufactured. I got my
printed circuit board back and populated it with components.
On my circuit board, I have a chip holder for a Basic STAMP
microcontroller. To those unfamiliar with it, the Basic STAMP is a
microcontroller which has an onboard Basic interpretter. What you do is
hook the Basic STAMP up to a PC via a COM port and send programs to it to
be executed on the circuit board.
Anyway, when it came to programming the chip, I was frustrated with
using Basic; the reason I was frustrated is that I am already experienced
with C and C++, and so had no interest in learning another language from
scratch, and also because Basic is the cripple of programming languages.

I want to write a program in C to be executed on my circuit board. My
initial thoughts were that I had two choices:

1) Somehow overide the Basic interpreter on the chip and supply it with my
own machine code to be executed (for this I would need a C compiler that
will produce machine code to be run on the Basic stamp).

2) Find a chip which has the same pin layout as the Basic STAMP and use
that instead.

Choice 2 would be my preference but I haven't found any such chip so
far. Would anyone here know of any such chip? As for Choice 1, I haven't a
clue how I would go about doing that so could anyone please offer some
advice?

I enquired around my college as to how I should go about this, and one
lecturer told me that there's a Java STAMP chip which is pin-compatiable
with the Basic STAMP. I thought this was great as the common features of C
and Java are almost identical... until I realised that Java doesn't have
pointers, ugh!

So any ideas on how I can write a program in C to be executed on my
circuit board which is set up to handle a Basic STAMP chip?

And just as an aside, why would anyone stick an interpreter on a
microcontroller when they can just compile the program on a PC and send the
machine code to the microcontroller. . . ?

--

Simon Walsh
Apr 23 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a

"Simon Walsh" <p@q.rwrote in message
news:mp*******************@news.indigo.ie...
>
I'm an Electronics student in college and I'm currently working on a
project. I was given a circuit diagram for my project, from which I had to
design a printed circuit board to be sent off and manufactured. I got my
printed circuit board back and populated it with components.
On my circuit board, I have a chip holder for a Basic STAMP
microcontroller. To those unfamiliar with it, the Basic STAMP is a
microcontroller which has an onboard Basic interpretter. What you do is
hook the Basic STAMP up to a PC via a COM port and send programs to it to
be executed on the circuit board.
Anyway, when it came to programming the chip, I was frustrated with
using Basic; the reason I was frustrated is that I am already experienced
with C and C++, and so had no interest in learning another language from
scratch, and also because Basic is the cripple of programming languages.

I want to write a program in C to be executed on my circuit board. My
initial thoughts were that I had two choices:

1) Somehow overide the Basic interpreter on the chip and supply it with my
own machine code to be executed (for this I would need a C compiler that
will produce machine code to be run on the Basic stamp).

2) Find a chip which has the same pin layout as the Basic STAMP and use
that instead.

Choice 2 would be my preference but I haven't found any such chip so
far. Would anyone here know of any such chip? As for Choice 1, I haven't a
clue how I would go about doing that so could anyone please offer some
advice?

I enquired around my college as to how I should go about this, and one
lecturer told me that there's a Java STAMP chip which is pin-compatiable
with the Basic STAMP. I thought this was great as the common features of C
and Java are almost identical... until I realised that Java doesn't have
pointers, ugh!

So any ideas on how I can write a program in C to be executed on my
circuit board which is set up to handle a Basic STAMP chip?

And just as an aside, why would anyone stick an interpreter on a
microcontroller when they can just compile the program on a PC and send
the
machine code to the microcontroller. . . ?
Just write a C compiler / interpreter in BASIC, and Bob's your uncle.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Apr 23 '07 #2

P: n/a
Simon Walsh wrote:
And just as an aside, why would anyone stick an interpreter on a
microcontroller when they can just compile the program on a PC and send the
machine code to the microcontroller. . . ?
STAMPs started life back when OTP (one time programmable) uC were the
norm, and so you could not actually do what you state.

STAMPs were a quite clever way to get 'soft' in to the software.

With todays Flash uC, with on-chip debug blocks, there is certainly
less need for a STAMP type approach.

-jg
Apr 23 '07 #3

P: n/a
Simon Walsh wrote:
2) Find a chip which has the same pin layout as the Basic STAMP and use
that instead.
Basic Stamp one was released in 1992.

I think it was 1995 when mEL released their first basic compiler that
was stamp compatible.

Today, you can use virtually any PIC chip with Basic, C, or many other
choices.

see:
http://www.dontronics-shop.com/home.php?cat=301
for a range of software that is available for PICs

Don...

--
Don McKenzie
E-Mail Contact Page: http://www.dontronics.com/e-mail.html

Crystal clear, super bright OLED LCD (128x128) for your microcontroller.
Simple serial RX/TX interface. Many memory sizes.
http://www.dontronics-shop.com/produ...roductid=16460

No More Damn Spam: http://www.wizard-of-oz.com
Apr 23 '07 #4

P: n/a
On Mon, 23 Apr 2007 19:02:42 GMT, Simon Walsh <p@q.rwrote:
>
I'm an Electronics student in college and I'm currently working on a
project. I was given a circuit diagram for my project, from which I had to
design a printed circuit board to be sent off and manufactured. I got my
printed circuit board back and populated it with components.
On my circuit board, I have a chip holder for a Basic STAMP
microcontroller. To those unfamiliar with it, the Basic STAMP is a
microcontroller which has an onboard Basic interpretter. What you do is
hook the Basic STAMP up to a PC via a COM port and send programs to it to
be executed on the circuit board.
Anyway, when it came to programming the chip, I was frustrated with
using Basic; the reason I was frustrated is that I am already experienced
with C and C++, and so had no interest in learning another language from
scratch, and also because Basic is the cripple of programming languages.

I want to write a program in C to be executed on my circuit board. My
initial thoughts were that I had two choices:

1) Somehow overide the Basic interpreter on the chip and supply it with my
own machine code to be executed (for this I would need a C compiler that
will produce machine code to be run on the Basic stamp).

2) Find a chip which has the same pin layout as the Basic STAMP and use
that instead.
I use a MicroChip pic and IDE. Put it on a dughter board with some
header pins that will plug intoo the Stamp socket. It woudl'nt be hard
to do.
Choice 2 would be my preference but I haven't found any such chip so
far. Would anyone here know of any such chip? As for Choice 1, I haven't a
clue how I would go about doing that so could anyone please offer some
advice?

I enquired around my college as to how I should go about this, and one
lecturer told me that there's a Java STAMP chip which is pin-compatiable
with the Basic STAMP. I thought this was great as the common features of C
and Java are almost identical... until I realised that Java doesn't have
pointers, ugh!

So any ideas on how I can write a program in C to be executed on my
circuit board which is set up to handle a Basic STAMP chip?

And just as an aside, why would anyone stick an interpreter on a
microcontroller when they can just compile the program on a PC and send the
machine code to the microcontroller. . . ?
Apr 23 '07 #5

P: n/a
Simon Walsh wrote:
I'm an Electronics student in college and I'm currently working on a
project. I was given a circuit diagram for my project, from which I had to
design a printed circuit board to be sent off and manufactured. I got my
printed circuit board back and populated it with components.
On my circuit board, I have a chip holder for a Basic STAMP
microcontroller. To those unfamiliar with it, the Basic STAMP is a
microcontroller which has an onboard Basic interpretter. What you do is
hook the Basic STAMP up to a PC via a COM port and send programs to it to
be executed on the circuit board.
Anyway, when it came to programming the chip, I was frustrated with
using Basic; the reason I was frustrated is that I am already experienced
with C and C++, and so had no interest in learning another language from
scratch, and also because Basic is the cripple of programming languages.

I want to write a program in C to be executed on my circuit board. My
initial thoughts were that I had two choices:

1) Somehow overide the Basic interpreter on the chip and supply it with my
own machine code to be executed (for this I would need a C compiler that
will produce machine code to be run on the Basic stamp).

2) Find a chip which has the same pin layout as the Basic STAMP and use
that instead.

Choice 2 would be my preference but I haven't found any such chip so
far. Would anyone here know of any such chip? As for Choice 1, I haven't a
clue how I would go about doing that so could anyone please offer some
advice?

I enquired around my college as to how I should go about this, and one
lecturer told me that there's a Java STAMP chip which is pin-compatiable
with the Basic STAMP. I thought this was great as the common features of C
and Java are almost identical... until I realised that Java doesn't have
pointers, ugh!

So any ideas on how I can write a program in C to be executed on my
circuit board which is set up to handle a Basic STAMP chip?

And just as an aside, why would anyone stick an interpreter on a
microcontroller when they can just compile the program on a PC and send the
machine code to the microcontroller. . . ?
I am fairly sure the CPU is a Microchip PIC16. You can get a limited
free compiler from Hi-tech. You will of course need to learn the
details of the Chip. Either way it is not a PC it will not Run C++.
The resources are very limited compared to a PC size CPU.
Apr 24 '07 #6

P: n/a

"Simon Walsh" <p@q.rwrote in message
news:mp*******************@news.indigo.ie...
>
I'm an Electronics student in college and I'm currently working on a
project. I was given a circuit diagram for my project, from which I had to
design a printed circuit board to be sent off and manufactured. I got my
printed circuit board back and populated it with components.
On my circuit board, I have a chip holder for a Basic STAMP
microcontroller. To those unfamiliar with it, the Basic STAMP is a
microcontroller which has an onboard Basic interpretter. What you do is
hook the Basic STAMP up to a PC via a COM port and send programs to it to
be executed on the circuit board.
Anyway, when it came to programming the chip, I was frustrated with
using Basic; the reason I was frustrated is that I am already experienced
with C and C++, and so had no interest in learning another language from
scratch, and also because Basic is the cripple of programming languages.

I want to write a program in C to be executed on my circuit board. My
initial thoughts were that I had two choices:

1) Somehow overide the Basic interpreter on the chip and supply it with my
own machine code to be executed (for this I would need a C compiler that
will produce machine code to be run on the Basic stamp).

2) Find a chip which has the same pin layout as the Basic STAMP and use
that instead.

Choice 2 would be my preference but I haven't found any such chip so
far. Would anyone here know of any such chip? As for Choice 1, I haven't a
clue how I would go about doing that so could anyone please offer some
advice?

I enquired around my college as to how I should go about this, and one
lecturer told me that there's a Java STAMP chip which is pin-compatiable
with the Basic STAMP. I thought this was great as the common features of C
and Java are almost identical... until I realised that Java doesn't have
pointers, ugh!

So any ideas on how I can write a program in C to be executed on my
circuit board which is set up to handle a Basic STAMP chip?

And just as an aside, why would anyone stick an interpreter on a
microcontroller when they can just compile the program on a PC and send
the
machine code to the microcontroller. . . ?

--

Simon Walsh
Pick a micro with a free c compiler.

Pic from microchip.com pic18f,pic24f and pic30f

microchip provide free student versions of their compilers for 18f,24f and
30f.
The pic16f only has the free limited version c compiler from hitec.
Pics were used in the earlier basic stamp models - I think(may be wrong)
that the latest ones are using scenix pic compatable micros
(run a lot faster up to 75MHz but no hardware peripherals).
avr from atmel www.atmel.com/avr
winavr or avrgcc(linux or mac) are ports of gcc for avr
http://winavr.sourceforge.net/

digikey have a special on avr stk500 + jtage ice2 for US$150
or stk500 + avr dragon for US$49
http://www.digikey.com/scripts/dksea...KIT&dkcid=1971

There is a basic compiler for avr's from mcselec.com bascom avr
lite version is a free demo
http://www.mcselec.com/index.php?opt...d=208&Itemid=1

Smiley electronics make a good beginners book/kit on c for avr's using the
avr butterfly board
<http://www.smileymicros.com/index.php?module=pagemaster&PAGE_user_op=view_page &PAGE_id=26&MMN_position=2:2>

get the free starter pdf http://www.smileymicros.com/QuickStartGuide.pdf

Another good website for avrs is www.avrfreaks.net

Both pics and avr's are fairly simple to learn and use.
16f has 35 assembler instructions, 18f approx 115 ,
avr's approx 115

Olimex make cheap pic and avr boards, sparkfun.com sells them
pic boards
http://www.sparkfun.com/commerce/cat....php?cPath=2_9

avr boards
http://www.sparkfun.com/commerce/cat...php?cPath=2_10

Also futurlec.com have some cheap boards but can take a while to ship your
order
and their boards are not that well documented for beginners.
http://www.futurlec.com/Boards.shtml
There is also the msp430 chips from TI
<http://focus.ti.com/mcu/docs/mcuprodoverview.tsp?sectionId=95&tabId=140&familyI d=342&DCMP=MCU_other&HQS=Other+IL+msp430>

They also have a gcc port available.
http://mspgcc.sourceforge.net/

sparkfun.com also sell some boards
http://www.sparkfun.com/commerce/cat...php?cPath=2_11

Alex
Apr 25 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.