Pages: [1]   Go Down
Author Topic: An interpreted language for Arduino  (Read 4558 times)
0 Members and 1 Guest are viewing this topic.
Japan
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have built an interpreted language for Arduino. The language resembles to Arduino language. You can check how the program is running and pin values visually. You can use the visualizing utility without interpreted language too.

Please check following URL,
http://n.mtng.org/ele/arduino/iarduino.html


Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8474
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks interesting and may be good for beginners to try out simple constructs.

Saving too many times to EEPROM will eventually cause a problem but not for a long time.

How do you edit an existing program?

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Japan
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for your comment.

The program is stored in RAM. It does not use EEPROM unless you request to save it in EEPROM by ``save'' command. The program in EEPROM is read into RAM at start-up. 

If you use the terminal, you can edit your program in the editor and replace the program by clicking ``prog'' button. You can read your program in RAM by ``Read from Arduino'' button.

If you use a serial terminal, the ``prog'' command replace the whole program in the RAM and you can replace a line with the ``edit'' command. For example you can replace line 2 by ``edit 2'' command.

// Noriaki Mitsunaga
« Last Edit: June 09, 2012, 06:14:55 pm by mnoriaki » Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8474
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I get it. I won't be using this myself but as I said if done well I can see it being useful for beginners to try small programs and experiment with the various C constructs, especially if you provide better error reporting than C usually does.

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Japan
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah, good point. Thanks.
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2066
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
interesting! Imagine I have an external ram connected (a ram of "any kind" and "any size") accessible via two C functions:

exram_write( unsigned int32 address, char data)

char exram_read( unsigned int32 address)

Would it be possible to modify the interpreter in such way that we may run the code (the interpreted language) from the external ram?
p.
« Last Edit: June 15, 2012, 06:00:27 pm by pito » Logged

Japan
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Currently the program is stored in RAM, e.g. char iArduinoProgBuf[600]; and current pointer is handled by char *prog. So I think it's possible if you carefully change *prog to exram_read(addr) and "prog ++" to addr ++ etc.

// Noriaki Mitsuanga
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2066
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Worth of try! With an external SPI sram/fram/mram you may store hundreds of kilobytes of the program code and "execute" it. It will run slower, but you may run programs virtualy "unlimited" in size   smiley
Logged

Pages: [1]   Go Up
Jump to: