S
Simon Walsh
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. . . ?
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. . . ?