User Tools

Site Tools


en:projects:4e4th:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:projects:4e4th:start [2018-05-12 23:45] mkaen:projects:4e4th:start [2018-05-13 00:17] (current) mka
Line 52: Line 52:
   Only "Wrap lines that exceed terminal width" may be checked.    Only "Wrap lines that exceed terminal width" may be checked. 
   Line Feeds and Echo are not allowed.    Line Feeds and Echo are not allowed. 
-  * 4E4th-IDE is a special Terminal Emulation for Forth Applications.   +  * 4E4th-IDE is a special Terminal Emulation for Forth Applications. http://www.4e4th-ide.org/ 
  
 == macOSX == == macOSX ==
Line 77: Line 77:
 == Linux ==  == Linux == 
  
-Seems to be working without special drivers. Disconnecting and reconnecting USB is an almost foolproof way to make the connection. Note: on most GNU/Linux distributions ''screen'' is installed by default while ''kermit'' requires manual installation.+Seems to be working without special drivers. Disconnecting and reconnecting USB is an almost foolproof way to set the serial communication connection.  Note: on most GNU/Linux distributions ''screen'' is installed by default while ''kermit'' requires manual installation.
  
 Tested on: Tested on:
Line 100: Line 100:
 ===== Starting 4E4th =====  ===== Starting 4E4th ===== 
  
-Start with connecting the LaunchPad to your PC or laptop, using the USB cable out of the LaunchPad box.  +As first step start with connecting the LaunchPad to your PC or laptop, using the USB cable out of the LaunchPad box. This USB connection is at the same time the LaunchPad's power supply and as well the serial Interface to your Terminal emulator.
-The USB connection is the LaunchPad's power supply and the serial Interface to your Terminal emulator. +
  
 As soon as the LaunchPad is connected, Forth is started (both LEDs are switched on) - assuming your Laptop or PC is switched on. For testing and to start Forth again, use the LaunchPad's Reset button.  As soon as the LaunchPad is connected, Forth is started (both LEDs are switched on) - assuming your Laptop or PC is switched on. For testing and to start Forth again, use the LaunchPad's Reset button. 
  
-4E4th starts with its latest saved status. To get back to the status at delivery, push and hold LaunchPad's button S2 and push the Reset button while holding S2. ReFlashing is done over the USB cable, too. +4E4th starts with its latest saved status. To get back to the status at delivery, push and hold LaunchPad's button S2 and push the Reset button while holding S2. Reflashing is done over the USB cable, too. 
  
 //Attention:  //Attention: 
Line 115: Line 114:
      
  
-===== Communication with the 4E4th ===== +===== Communication with 4E4th ===== 
  
  
Line 135: Line 134:
  
 Type ''.s'' (a dot and character "s") and <Enter>. Type ''.s'' (a dot and character "s") and <Enter>.
-4E4th answers with the quantity of the typed values and shows the typed values which are on the stack. +4E4th will show the typed values which are on the stack.  
 You may repeat the ''.S'' command several times. You should always get the same result.  You may repeat the ''.S'' command several times. You should always get the same result. 
  
-4E4th is capable of different number bases. 4E4th starts in DECIMAL mode and then accepts only decimal numbers. To make Embedded Systems programming easier, you may switch to HEX mode, and 4E4th only accepts hex numbers then. Typing DECIMAL switches back to decimal mode. +4E4th is capable of different number bases. 4E4th starts in DECIMAL mode and then accepts only decimal numbers. To make Embedded Systems programming easier, you may switch to HEX mode, and 4E4th only accepts hex numbers then. Typing DECIMAL switches back to decimal mode. Using hex numbers A B C D E F in decimal mode will produce an error message.
  
-Here another Test.  +Here another Test. Type this text – and end with <enter>:
-Type this text:+
  
   : TEST ." I am here " ;    : TEST ." I am here " ; 
  
-4E4th answers with ''ok'', as usual, to show that your input is accepted.  +4E4th answers with ok as usual, to show that your input has been accepted.  
-You just created a new command, and this command has just been added to the 4E4th system. +You have just created a new command, and this command has as well been added to the 4E4th system. 
  
 Now type  Now type 
Line 155: Line 153:
 type a colon '':'', and at the end of this definition you type a semicolon '';'' type a colon '':'', and at the end of this definition you type a semicolon '';''
  
-More examples you will find in Forth Tutorials - look at "Starting Forth online edition" which you will find at http://www.forth.com/starting-forth/ +See chapter 11a, b and c in A Start With Forth https://wiki.forth-ev.de/doku.php/en:projects:a-start-with-forth:start0 
 + 
 +More examples you will find in Forth Tutorials - for example look at the classic "Starting Forth online edition" which you will find at http://www.forth.com/starting-forth/ 
  
 //All Forth words in the examples are written in CAPITAL letters. The 4e4th does not care whether you type CAPITAL or small letters uses. This behavior is called case insensitive. // 

 //All Forth words in the examples are written in CAPITAL letters. The 4e4th does not care whether you type CAPITAL or small letters uses. This behavior is called case insensitive. // 


Line 166: Line 166:
 It is possible to upload and save the MCUs image using a Programmer.  It is possible to upload and save the MCUs image using a Programmer. 
  
-To remove your program, type WIPE. Be careful. This is a powerful instruction. When typing WIPE, your work of may be several hours will be gone. That's why 4E4th-Terminal logs all your typing, and you will be able to download your work again. +To remove your program, type WIPE. Be careful. This is a powerful instruction. When typing WIPE, your work of may be several hours will be gone. That's why 4E4th-IDE logs all your typing, and you will be able to download your work again. 
  
 Another way to remove your programs is by pressing the LaunchPad's S2 button and then the RESET button while holding S2.  Another way to remove your programs is by pressing the LaunchPad's S2 button and then the RESET button while holding S2. 
Line 175: Line 175:
 ===== Troubleshooting ===== ===== Troubleshooting =====
  
-If nothing is working anymore, the ultima ratio is to ReFLASH the MCU.+If 4e4th staopped working completely, the ultima ratio is to ReFLASH the MCU.
  
-Having Windows, start the Programmer and the same source again, using the FET-Pro430 and AUTOPROG. Jumpers stay as they are.+Assuming Windows, start the Programmer and the same source again, using the FET-Pro430 and AUTOPROG. Jumpers stay as they are.
  
 The Programmer uses Port USB HID00xx to connect to LaunchPad using the same USB Port the Terminal uses. The Terminal may stay connected. The Programmer uses Port USB HID00xx to connect to LaunchPad using the same USB Port the Terminal uses. The Terminal may stay connected.
Line 188: Line 188:
 In case you like to edit the 4E4th kernel, clone this project https://github.com/mikalus/4e4th05a. In case you like to edit the 4E4th kernel, clone this project https://github.com/mikalus/4e4th05a.
  
-There is a readme.430 file and some other documentation which tells you how to get your Forth done by yourself+There is a readme.430 file and some other documentation which tells you how to get your own special Forth done. 
  
-Github contains all the code and programs you need to generate your Forth. The binary image 4e4th05a.hex you can load into the LaunchPad's MSP430G2553 directly +Github contains all the code and programs you need to generate your Forth. The binary image 4e4th05a.hex you can directly load into the LaunchPad's MSP430G2553 chip. The *.asm files hold the complete 4E4th source code.
-The *.asm files hold the complete 4E4th source code. +
  
  
Line 197: Line 196:
  
  Memory   Memory 
-  SAVE ( -- )  Saves the typed additions. Stacks unchanged. Saves actual uarea. Makes last definition autostart. +  SAVE ( -- )  Saves the typed additions. Stacks are unchanged. Saves actual uarea. Defines as well the last definition for autostart. 
   WIPE ( -- )  Back to original status. Stacks unchanged. uarea back to original.    WIPE ( -- )  Back to original status. Stacks unchanged. uarea back to original. 
  
  
  Peripherals - Port1 and Port2    Peripherals - Port1 and Port2  
-  csetb          m adr --                    set port pins at address with mask  +  csetb          m addr --                    set port pins at address with mask  
-  cclrb          m adr --                    clear port pins at address with mask  +  cclrb          m addr --                    clear port pins at address with mask  
-  red           -- m adr                    red LED mask and port1 address  +  red           -- m addr                    red LED mask and port1 address  
-  green         -- m adr                    green LED mask and port1 address+  green         -- m addr                    green LED mask and port1 address
   S?            -- f                        test button S2, true when pressed    S?            -- f                        test button S2, true when pressed 
  
Line 218: Line 217:
   P1.6 = LED2 = green   P1.6 = LED2 = green
      
-The Forth words ''csetb'' and ''cclrb'' are working bit wise. ''csetb'' needs a Bit-Mask and address on stack, ''cclrb'', too.  +The Forth words ''csetb'' and ''cclrb'' are working bit wise. ''csetb'' needs a bit-mask and address on stack, ''cclrb'', too.  
-Such a Mask is a Byte with the needed Bits set. The Forth Words ''red'' and ''green'' put such masks onto data stack along with an address to work on:+Such a mask is a byte with the needed bits set. The Forth Words ''red'' and ''green'' put such masks onto data stack along with an address to work on:
  
   red     0x01 = 00000001   0x21 = Port1 output register   red     0x01 = 00000001   0x21 = Port1 output register
Line 244: Line 243:
   SAVE   SAVE
      
-It is good habit to have an exit from your app back to Forth. Otherwise a WIPE is due in case you like to interact with 4e4th again: press S2+reset. +It is good practice to have an exit from your app back to Forth. Otherwise a WIPE is due in case you like to interact with 4e4th again: press S2 + reset buttons
    
 We hope we soon will have a nice 4E4th collection of [[projects:4e4th:4e4th:start:beispiele|example programms]] and you are allowed to add your examples there to be used by the 4E4th community. We hope we soon will have a nice 4E4th collection of [[projects:4e4th:4e4th:start:beispiele|example programms]] and you are allowed to add your examples there to be used by the 4E4th community.
Line 253: Line 252:
  
 ====== Requirements ====== ====== Requirements ======
-To communicate with the LaunchPad's MCU, you need a Terminal or a Terminal Emulator on your PC. It's good to have a Programmer Softwaretoo, to reFLASH the chip. All these programs need the correct drivers for the LaunchPad. These drivers must have been installed at your Operating System first.+To communicate with the LaunchPad's MCU, you need a Terminal or a Terminal Emulator on your PC. It is important to have a Programmer Software too, to reFLASH the chip. All these programs need the correct drivers for the LaunchPad. These drivers must have been installed in your Operating System first.
  
 Ti's engineers assume that you program your LaunchPad using C or Assembler. Therefore TI offers so called Integrated Development Environment (IDE) software - the IAR "Kickstart" and Code Composer are downloadable as free but limited versions. The free Code Composer can be used for free for a limited time, the free IAR Kickstart is free only for projects up to 4k. For now (March 2012) there is no special free TI-IDE. Ti's engineers assume that you program your LaunchPad using C or Assembler. Therefore TI offers so called Integrated Development Environment (IDE) software - the IAR "Kickstart" and Code Composer are downloadable as free but limited versions. The free Code Composer can be used for free for a limited time, the free IAR Kickstart is free only for projects up to 4k. For now (March 2012) there is no special free TI-IDE.
Line 269: Line 268:
 Start LaunchPad_Driver.exe (mouse double click). Start LaunchPad_Driver.exe (mouse double click).
 There seems to be no result, but after this action LaunchPad will be recognized and is ready to go. This works for 32 bit  and 64 bit systems. There seems to be no result, but after this action LaunchPad will be recognized and is ready to go. This works for 32 bit  and 64 bit systems.
- 
-With this little action you avoid to install IAR's "Kickstart". 
  
 Connect your LaunchPad to USB (remember: connect cable to LaunchPad first), you should get a ready to go message. Connect your LaunchPad to USB (remember: connect cable to LaunchPad first), you should get a ready to go message.
Line 368: Line 365:
 There is a group which is collecting tools: There is a group which is collecting tools:
 http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Mac_OS_X http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Mac_OS_X
 +
 ===== Source Upload via Terminal ===== ===== Source Upload via Terminal =====
  
Line 487: Line 485:
 http://www.ti.com/product/msp430g2553 http://www.ti.com/product/msp430g2553
  
-revisions mk20121224 mk20180512+revisions mk20121224 mk20180512 mk20180513 
 + 
 +4e4th05a May 2018
en/projects/4e4th/start.1526161500.txt.gz · Last modified: 2018-05-12 23:45 by mka