Re: Free Alternative to PicBasic?
- From: mike <spamme9@xxxxxxxxx>
- Date: Sat, 01 Jan 2011 09:34:21 -0800
Frank Buss wrote:
D Yuniskis wrote:Have no need for an interpreter. Actually got one for
Find a copy of the "BASIC 52" interpreter Intel used
decades ago in their masked 8052AH-BASIC part. This
is written in 8052 assembler. You can study how the
interpreter works and then *translate* it to the
processor of your choice.
the 16F877. Works, but slow as...
Don't think it runs on the 877A 'cause it tries to write
a word at a time and trashes three words in the process.
Any compiler with an assembled output will let you
examine what's under the hood. My objective is to
stay out from under the hood as much as possible.
This gives you exposure to a different class of processor
(8048/52), assembly language (on *two* processors) *and*
a "BASIC" that you can use on your ultimate target AS WELL
AS the knowledge of what's under the hood (so you could
modify it to add features that you might want).
Yep, that's a little too far off the beaten path.
I did write the code for my ham radio repeater/remote base/phonepatch
in assembler for the RUPI variant of the 8051..or maybe it was an 8048
variant...was a LONG time ago. Couldn't afford to buy a uP, so got RUPI's
out of old computer keyboards. I remember my excitement when I got my
first UV eraser at home. ;-) Also remember the look on my boss' face when I put
in a requisition for a hundred 64Kbit EPROMS at $250 each. Good times...
I guess you've won the prize for the most difficult solution for his
I doubt Mike can do it, if he has already problems using C, e.g. installing
MPLAB has been installed for years. Used it to run the picstart+ until
bootloaders became popular and Microchip started giving away samples
that could be bootloaded.
I tried to use the simulator, but everything I do is real-time and/or
interrupt driven. Simulator wasn't too useful to me.
and using an example from the free HI-TECH C compiler as the base for
his programs and reading the datasheet for calculating the values for the
baud rate registers instead of using some program magic for it.
Reading the datasheet is not HARD. It's a matter of having to
remember to recalculate
it all again every time you change clock rate or baud rate. IT's really
handy to have the compiler fix it. I'm dyslexic, you know....
limitation of the HI-TECH C compiler is that the code is not as optimized
as in the commercial version. It's really not that difficult, see e.g. this
Optimization is not critical for me. I try to do all the user interface stuff
on a palm pilot, the hardware stuff on the PIC in BASIC with inline
assembler where I need speed or predictability. Still have a lifetime
supply of PAL20V8's for the really fast stuff ;-) Yes, I do live two
decades in the past. It's much cheaper...nearly free... here.
Is there a computer mnemonic like NAN for free? How about NA$ ?
One thing I'd like to get
out from under is the darn paged memory in the PIC. I'm always tripping
over page boundaries when I try to cheat the compiler. Spent half a day
fretting over why two BASIC instructions wouldn't work when translated
to two assembler instructions. Whodathunk they'd put the TRIS register
and PORT register in different memory pages. I'm gonna have RTFM tattooed
backwards on my forehead so I can read it in the mirror.
Just took another look at HI-TECH C. The bootloader incompatibility is a problem for
the trial version. Shouldn't be a problem for the tiny bootloader
if they didn't put anything in address 3.
I had it in my head that they had severe limitations
in chip support and code size for the expired trial.
Or this preview of my latest project, a speed and time measurement device
with 200 us resolution (with a PIC18F252)
Your setup isn't too different from mine. I use an old Heathkit breadboard with RS232, keyboard and lcd cobbled onto it.
I took the easy way out
and use a BT-serial converter for wireless connection to the Palm.
Also built a PIC GPIB to serial converter so I can do instrument control.
But I'm afraid to use it. I fast charge batteries. All I need is for
the bluetooth to lock up and explode something. My code is not fault-tolerant...yet.
I seem to have come off as incompetent.
I did try to ask simple questions.
I claim to be competent, just lazy and CHEAP!!!
I tend to use whatever I've got and make it work.
So far, the most interesting thing I've found is Great Cow Basic.
Looks much like PicBasic, except it's free. Can't find any mention
of inline assembler. Gonna need that for interrupt
handlers and some optimizations.
I spent much of the day reading about Arduino. That looks interesting
too. I haven't convinced myself to spend the $20 to buy one, but I might
Also dug thru the junkbox and found a TI MSP430 eZ430-RF2500
wireless prototype kit. Also, somewhere I have the previous version without the RF.
As I recall, the prototype boards with the processor were 3 for $10.
That's more my speed ;-)
Never did anything other than run the wireless demo. Ran into the same
(lack of) compiler issues.
What are your thoughts on TI chips?