cancel
Showing results for 
Search instead for 
Did you mean: 

FORTH for STM8S-Discovery

ting
Associate II
Posted on July 20, 2010 at 07:08

Here is a FORTH interpreter-compiler for Discovery Board.  It is in the form of an assembly file stm8ef.asm.  You can assemble it on STVD and download it to Discovery.  You need a UART connection to Hyperterminal on PC to interact with STM8S microcontroller.

If you are lucky enough, or persist enough to get it going, the whole Hyperterminal project will be reduced to 6 lines of FORTH code:

 1 500F C! ; turn off LED

 0 500F C! ; turn on LED

 3E 50F3 C! ; turn on 1 KHz beep

 7E 50F3 C! ; turn on 2 KHz beep

 FE 50F3 C! ; turn on 4 KHz beep

 1E 50F3 C! ; turn off beep

This is how microcontrollers are to be used.

Good luck,

Ting. 
14 REPLIES 14
saouinet
Associate
Posted on December 07, 2010 at 13:52

Hi Ting,

I just found a little trouble in the UART's configuration 

UARTCR1 is set to 0x06 instead of 0x00 for a 8data bits, no parity as configuration.

It works well if people don't forget to execute HEX word first ;)

Nice job, I need to save my new words in flash now ;)

Regards

Slim

Posted on December 07, 2010 at 23:53

''You need a UART connection to Hyperterminal''

 

 

I'm sure you don't need Hyperterminal - any terminal will do!
holinepu
Associate II
Posted on December 16, 2010 at 16:23

    I've bought several stm8s discovery board to play under stm8s eForth.developped by Dr. Ting. I've designed my own assembler to facilate the programming. See if you are interested in this kind of assembler--- High Level Algebraic Assembler (HLAA). I need someone to use it to see if it's usefullness.

The whole assembler/disassembler/decompiler/compiler are all included in one package with free of charge. Have fun with Forth and HLAA.         holi

ps. stm8s47.f  can be found in the website of ARMForth.
holinepu
Associate II
Posted on December 17, 2010 at 03:52

the folder for eForth related files is stm8s-Discovery on:

http://tech.groups.yahoo.com/group/armForth/files/

Posted on December 21, 2010 at 23:48

''I need someone to use it to see if it's usefullness''

 

I guess Obiwan Kenobi might like it...?
holinepu
Associate II
Posted on December 24, 2010 at 08:46

May I ask who is Obiwan Kenobi?  Maybe I can get in contact with him to show how the usefullness of what I've developed if he knows forth or so as to say. I've had several followers to help me to test or verify the code. But still I need more people helping the test.

Posted on December 24, 2010 at 16:26

http://en.wikipedia.org/wiki/Obi-Wan_Kenobi

Sorry - it was a joke: ''may the FORTH be with you''

holinepu
Associate II
Posted on December 29, 2010 at 02:37

 I can feel it.

 

But if you look at it seriously, you'll find it's a great breakthrough of the assembler you've ever seen in your life. It's a completely different story you'll see.

stm8s65.f  is  the main file to download.

holinepu
Associate II
Posted on December 30, 2010 at 01:29

You could download the whole system from:

http://tech.groups.yahoo.com/group/armForth/files/

the folder file is  stm8s-discovery.

http://tech.groups.yahoo.com/group/armForth/files/