![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| It's called Small BASIC and has versions for PalmOS, VTOS, Franklin's, Linux, Win32 and DOS. It's free and I use it for little utility programs; I find it very handy and hope that some of you forum users might find it useful also. http://smallbasic.sourceforge.net/ Here's a quick program I cobbled together to calculate a freerunning Timer0 (PIC) for refreshing LED displays and a realtime clock. Code: 'Calculates a freerunning timer0 refresh clock xtal = 3686400 'the PICs main crystal digits = 4 'the number of digits you want to refresh minrate = 40 'minimum refresh rate per digit clock = xtal /4 /256 /digits 'max refresh speed of timer0 clock for x digits for i=8 to 0 step -1 if (clock /2^i) >= minrate then exit next i if i=-1 then print "Oscilator too slow for refresh" :end print "With the TIMER0 prescaler set for 1/";2^i print "TIMER0 will overflow ";clock /2^i*digits;" times a second" print "A ";digits;" digit display will refresh at ";clock /2^i;" hz per digit." This demostrates why I like using 3.6864 MHz in my projects (it's also perfect for serial communications)
__________________ Bill Home of the Firefly PIC Tutor Inchworm ICD2 http://www.blueroomelectronics.com | |
| |
| | (permalink) |
| Thanks, Bill. I have been using GWBASIC in DOS for about 40+ years and am ready for something that runs in windows. I downloaded the XP version but it did not run. The 32 bit version runs fine, however, so I will try that out. Russ
__________________ see my website: www.geocities.com/russlk | |
| |
| | (permalink) |
| Thanks Russ, it was the BASIC programs on your web site that got me to post this. I download this version for XP worked fine for me. sbasic_fltk_0_9_7.exe I've also fixed an error in the original program timer0.bas | |
| |
| | (permalink) |
| Is the serial port supported on a WinXP machine? | |
| |
| | (permalink) | |
| Quote:
__________________ Bill Home of the Firefly PIC Tutor Inchworm ICD2 http://www.blueroomelectronics.com | ||
| |
| | (permalink) |
| I ask because I get an "unsupported" error message when running the example 'chat' program on the open "com1:" AS #1 line in the program... Regards, Mike | |
| |
| | (permalink) |
| Still haven't figured out if access to the serial port works on WinXP machine... If I'm missing something that's obvious to one of you guys could you point me in the right direction please? Thanks guys... Regards, Mike | |
| |
| | (permalink) |
| Are you wanting a DOS basic compiler for the Windows platform? Powerbasic.com, they have a trial (PBDOS I think it is) that will do small projects. Best I have seen, and the PBCC (32 bit and both are no GUI), but they charge for the 32 bit compiler. Basic for the palm. I like aldweb.com (izibasic) is the best I have found. Cross platform is cool, but I have not found anything yet that is close. Big problem is the GUI interface. I will have a look at it though. Are we in the Electronic Chat forum? This might fit the Microcontroller forum better | |
| |
| | (permalink) |
| Has anyone had any luck using the serial port in Small Basic on WinXP? Regards, Mike | |
| |
| | (permalink) |
| Here's a list of all the free BASIC programs, SmallBASIC is among them. http://www.thefreecountry.com/compilers/basic.shtml COM communications seemed to always be a sore point for visual BASIC, It was near useless in VB3 and sort of fixed (but you had to load a module) in VB4. I've not used VB5 or 6 so I can't comment on them. I used to use Turbo BASIC (still have it) it became Power BASIC. The reason I began to use SmallBASIC was to share simple programs in forums & on the web. Unlike compiled programs you could run them on any OS. Perhaps one of the other free BASICs have COM support, I'd be interested in this also. PS Mike. This odd program compiles, not sure what it does in SmallBASIC (no baud settings etc...) Code: open "COM1" as #1 print #1,"Hello" close #1 http://www.justbasic.com/index.html *** Update *** Just BASIC seems fine; installs in XP easily. The exit command is different (bad programming practice anyway) Code: 'SmallBASIC for i = 1 to 10 if i = 5 then exit next i ' Just BASIC exit command requres the loop type suffix for i = 1 to 10 if i = 5 then exit for next i
And you get RS232 communications OPEN "COMn:baud,parity,data stop{,options}" for random as #handle
__________________ Bill Home of the Firefly PIC Tutor Inchworm ICD2 http://www.blueroomelectronics.com | |
| |
| | (permalink) |
| Hi Bill, Downloaded Just BASIC v1.01 and it looks very promising... I've got it talking to an RS232 parasitically powered 12F675 board through COM1 at 9600 baud... Yippee... Thank you very much... Kind regards, Mike | |
| |
| | (permalink) | |
| Quote:
Guess I'm switching from SmallBASIC to Just BASIC.
__________________ Bill Home of the Firefly PIC Tutor Inchworm ICD2 http://www.blueroomelectronics.com | ||
| |
| | (permalink) |
| Hope you all don't mind me bringing up an old thread... Just wanted to say thanks for the tip on the Just BASIC interpreter... I think it's gonna work out just fine, though it's a pain-in-the-butt trying to learn it without any type of written documentation (Help File and Forum only)... Kind regards, Mike ![]() Last edited by Mike, K8LH; 21st May 2006 at 01:32 PM. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |