| Author |
Message |
|
|
Posted: Sep 29, 2008 - 12:34 AM |
|

Joined: Sep 22, 2008
Posts: 47
Location: Bothell, WA
|
|
I have version 0.5 of KLBasic ready to go. LFs are now ignored from the console.
Note that there are two files in this release, one for the 'mega128 and one for the 'mega1284p. The 'mega1284p version supports 11K of code space and 1K each of variable and array space. I'm running my '1284p at 20MHz so the benchmark01 program shows 50K empty loops in 0.811 seconds. |
|
|
| |
|
|
|
|
|
Posted: Sep 29, 2008 - 07:15 AM |
|

Joined: Dec 18, 2001
Posts: 4704
|
|
| the mega128 is still 16MHz? |
|
|
| |
|
|
|
|
|
Posted: Sep 29, 2008 - 03:41 PM |
|

Joined: Sep 22, 2008
Posts: 47
Location: Bothell, WA
|
|
|
stevech wrote:
the mega128 is still 16MHz?
Sorry for the omission. Yes, the 'mega128 is 16 MHz, the 'mega1284p is 20 MHz.
I'm open to suggestions on how to support a variety of crystal speeds across several MCU types. Besides the problem with console baud rates, changing the crystal impacts the down-counting timers and the uptime variable.
As it is, I'm keeping three different MCU boards laying around; I really don't want to have to switch crystals so I can test-drive versions with different clocks.
I also don't want to just turn loose a .hex file that I haven't tested because follow-on support becomes a nightmare if I don't have a suitable platform.
Any thoughts?
klaxon44 |
|
|
| |
|
|
|
|
|
Posted: Sep 29, 2008 - 03:52 PM |
|

Joined: Apr 01, 2004
Posts: 3812
Location: New Mexico
|
|
|
klaxon44 wrote:
Any thoughts?
External jumpers to set the program's knowledge of clock speed at initialization time? Open-source project so that people can compile the source based on their own CPU speed? Defined EEPROM location where end-users can program their own clock speed identifier? [auto baud rate detection has already been discussed] |
_________________ Kevin Rosenberg
http://b9.com
http://kevin.hypershots.com
|
| |
|
|
|
|
|
Posted: Sep 29, 2008 - 03:56 PM |
|


Joined: Sep 04, 2002
Posts: 21249
Location: Orlando Florida
|
|
| How about a 'limp home mode' that boots at internal 1mhz and 1200 baud until you pick an xtal speed somehow? What percent is the flash filled up? Need a collaborator to put nokia graphics module or a fat on an sd card module in there? |
_________________ Imagecraft compiler user
|
| |
|
|
|
|
|
Posted: Sep 29, 2008 - 06:29 PM |
|

Joined: Oct 07, 2002
Posts: 2015
Location: Denmark
|
|
Or have the first addr in the eeprom (or something like that) deside the speed, or even put it in a well defined byte in the hex file.
But why not have the normal way where you send a space and the taget make the speed calc?
Jens |
|
|
| |
|
|
|
|
|
Posted: Sep 30, 2008 - 01:21 AM |
|


Joined: Sep 04, 2002
Posts: 21249
Location: Orlando Florida
|
|
| Thats what they cal 'autobaud'... if you know the char he's typing, and the xtal speed, you can either measure the bitwidth or look up the char you got in a table of different baudrates. I think the bet's off if the program doesnt know the xtal freq. But I actually thought the idea about having the initial turnon using 1mhz and 1200 baud was pretty clever. That's why I'm mentioning it again. Brazen hubris. |
_________________ Imagecraft compiler user
|
| |
|
|
|
|
|
Posted: Sep 30, 2008 - 07:02 PM |
|

Joined: Oct 07, 2002
Posts: 2015
Location: Denmark
|
|
Can the 1280 switch from intern osc to extern on the fly ? (I don't think so)
Jens |
|
|
| |
|
|
|
|
|
Posted: Sep 30, 2008 - 07:29 PM |
|


Joined: Jul 18, 2005
Posts: 62228
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Quote:
Can the 1280 switch from intern osc to extern on the fly ? (I don't think so)
Nope (so you were right to think not)
I'm intrigued to know why on earth one would want to do that anyway? |
_________________
|
| |
|
|
|
|
|
Posted: Sep 30, 2008 - 08:37 PM |
|

Joined: Oct 07, 2002
Posts: 2015
Location: Denmark
|
|
How else would you start at 1MHz so the baud rate is fixed, when you want to run 16 or 20 MHz.
Jens |
|
|
| |
|
|
|
|
|
Posted: Sep 30, 2008 - 09:56 PM |
|

Joined: Sep 22, 2008
Posts: 47
Location: Bothell, WA
|
|
|
bobgardner wrote:
How about a 'limp home mode' that boots at internal 1mhz and 1200 baud until you pick an xtal speed somehow? What percent is the flash filled up? Need a collaborator to put nokia graphics module or a fat on an sd card module in there?
I am DEFINETLY looking to put SD/FAT on a '1284p! That would let me open up datalogging, text files, and other goodness.
klaxon44 |
|
|
| |
|
|
|
|
|
Posted: Nov 19, 2008 - 06:54 PM |
|

Joined: Oct 21, 2008
Posts: 4
|
|
I loaded the mega128 .hex file on my home-made "wiring.org" board.This interpreter works great.With 8 LED's connected to port "c" I was able to test the port with a small program.
10 ddrc=$ff
20 for x=0 to 255
30 portc=x
40 for t=1 to 2000
50 next t
60 print x;
70 print " ";
80 next x
RUN
Thanks |
Last edited by posix1965 on Nov 20, 2008 - 05:05 PM; edited 1 time in total
|
| |
|
|
|
|
|
Posted: Nov 19, 2008 - 08:32 PM |
|


Joined: Mar 07, 2001
Posts: 2376
Location: Stockholm, Sweden
|
|
|
farang wrote:
While not a serious replacement for C or Basic compilers (remember Forth?), a basic interpreter is an excellent tool for learning programming concepts, and for debugging hardware -the peeks and pokes and input and output commands are excellent ways to tickle port pins or look at them.
Isn't that what the Dragon/JTAGICE is for? Which you just used to downoad the Basic Interpreter with?
In ye olde days, yes, it was great for debugging and testing, but today?
Especially not a closed source one. There are plenty of open source variants around.
And who hasn't written one themselves? |
_________________ /Jesper
http://www.yampp.com
The quick black AVR jumped over the lazy PIC.
What boots up, must come down.
|
| |
|
|
|
|
|
Posted: Nov 19, 2008 - 08:37 PM |
|


Joined: Mar 27, 2002
Posts: 18528
Location: Lund, Sweden
|
|
|
Quote:
And who hasn't written one themselves?
Bill?  |
|
|
| |
|
|
|
|
|
Posted: Nov 19, 2008 - 09:53 PM |
|

Joined: Oct 21, 2008
Posts: 4
|
|
All my .hex file are downloaded using Avrdude on a Linux terminal
emulator,and while I still like programming in C it sure beats getting an output without having to program the AVR's flash.
I can't wait until PWM and other IN/OUTS are available using the interpreter. |
|
|
| |
|
|
|
|
|
Posted: Nov 19, 2008 - 10:13 PM |
|


Joined: Aug 13, 2006
Posts: 6694
Location: Bellingham, WA - USA
|
|
|
Quote:
Bill?
Since this funny came from you, Johan:
A thought in young Billie's head swirled
And finally it danced and it whirled
"A BASIC I'll claim
Without the least shame
And with it I'll soon rule the world." |
_________________ Chuck Baird
"It's better to catch the trapeze than test the safety net" -- RPi book
http://www.cbaird.org
|
| |
|
|
|
|
|
Posted: Nov 19, 2008 - 10:29 PM |
|

Joined: Jun 04, 2007
Posts: 1075
Location: Cincinnati, Ohio - USA
|
|
I think you've created a monster Johan!  |
|
|
| |
|
|
|
|
|
Posted: Jan 02, 2009 - 04:54 PM |
|

Joined: Jul 08, 2002
Posts: 4
|
|
I try this nice piece of code.
But the most comun AVR is the MEGA32 I guess.
Can you supply a version for the AT MEGA 32 or the AT MEGA 644 p ?
Thanks to submit your work.
Have an happy new Year
Georges |
|
|
| |
|
|
|
|
|
Posted: Jan 02, 2009 - 05:14 PM |
|


Joined: Mar 27, 2002
Posts: 18528
Location: Lund, Sweden
|
|
|
Quote:
But the most comun AVR is the MEGA32 I guess.
Do you have any numbers to put behind that? Or is it really a wild guess / shot in the dark? |
|
|
| |
|
|
|
|
|
Posted: Jan 02, 2009 - 07:14 PM |
|


Joined: May 30, 2004
Posts: 8118
Location: Cincinnati, Ohio
|
|
|
JohanEkdahl wrote:
Quote:
But the most comun AVR is the MEGA32 I guess.
Do you have any numbers to put behind that? Or is it really a wild guess / shot in the dark?
If you go by the numbers in my parts bin, I'd have to agree that the Mega32 was the more popular AVR, at one point in time.
But now I seem to have nearly that in each of the Mega168, Mega324, Mega644 & Tiny2313 controllers - all in TQFP packaging, of course. |
_________________ Carl W. Livingston, KC5OTL
microcarl@roadrunner.com
"There are only two ways to sleep well at night... be ignorant or be prepared."
The original Dragon Slayer !
Long live the AVR!!!
|
| |
|
|
|
|
|