Friday, December 5, 2014

FISH Forth V1.6 - LPC1115 - STM32F4xx

Clyde has added some more FISHes to the repertoire. One for the NXP LPC1115 which has 8K of RAM and 64K of Flash. Plus updated versions (V1.6) of his previous LPC1114 Forths. All at the link.

And a version for the STM32F4 Discovery Board.

The general link for all his publicly available files is Clyde's FISH Forth.


This is a note on loading the LPC1115 FISH into an LPC1115 with Flash Magic. When it tries to verify you get an error message. Ignore it. I have a help ticket in with NXP, but so far they have not responded.

Engineering is the art of making what you want from what you can get at a profit.

Tuesday, August 19, 2014

FISH Forth V1.5 - LPC1114 Updated Support - LPC812 Updated Support

Clyde has updated FISH Forth to Version 1.5. He has made some improvements. I'm just going to cover the major ones. There are now two versions of the FISH Forth for the LPC812. One is the full FISH suite and has 1K of Flash available for storing user programs. The other is a slightly reduced FISH (reductions noted in the documentation) that can hold 2K of user programs. The LPC812 has 4K of RAM space giving about 1 1/2K of user RAM space.

There is also a new FISH Forth for the LPC1114. It covers the versions of the LPC1114 (and likely the LPC1115 when we test it) that have 8K of RAM. The LPC1114 that we have tested has 32K of Flash (16K of program space) and 8K of RAM (giving about 5 1/2K of user RAM space). All the older versions of our software (that don't have known fatal bugs) are still available.

I will be providing links to all our hardware and software in another post which will be permanently on the sidebar.

Clyde has a link he will be using to post all new version of FISh and associated software and different processor versions. FISH File Folders.

Engineering is the art of making what you want from what you can get at a profit.

Sunday, August 17, 2014

TTL to USB 22April2014

The TTL to USB board is a board that can interface to a USB computer port and deliver UART serial communications to any device that can accept them. Interface voltages between 5.25V and 1.8V can be handled by feeding the appropriate voltage. to the VI designated pins on J1 or J2. J1 is an 8 pin header that delivers TxD and RxD only. J2 adds CTS and RTS for hardware flow control.

You can find complete documentation (schematic, parts list, PCB board layout) for the board at TTL to USB 22April2014 - Doc.

This board is available from OSH Park for $5.10 each.

We have some boards in development that use this board for interfacing to allow software development. You can also use this board with flying jumpers to connect any board (such as Code Red boards) to a USB port.

Engineering is the art of making what you want from what you can get at a profit.

Wednesday, August 13, 2014

LPC1114LQFP Devl 15Julyl2014

The LPC1114LQFP Devl is a USB powered board that has both a parallel port and an I2C port on board. This board is similar to our LPC812 Devl - 20 March 2014 except that it has more usable memory (16K of open Flash with our FISH Forth) and a larger RAM (8K vs 4K). The chip is a little harder to hand solder than the other chips we generally use (.5 mm lead spacing vs .65 mm) but I have developed a method that makes the soldering relatively easy.

First mount all the 4.7uF capacitors. They will provide a small measure of anti-static protection. You should do your work on an anti-static surface. Put a dab of Chip Quik in the center of the part outline (U1) away from the chip leads. Use enough to make sure it holds the chip in place. Once the chip is in place use a resistor lead from a through hole resistor) or similar to push the chip around until all the pads are aligned. Check all four sides of the chip to make sure you have gotten it right. Once the pads are aligned put a little Chip Quik near one of the corner pads. Solder the corner pad (do not touch it) with Chip Quik flux. Check alignment. Go to the opposite corner from the one you just soldered and put a little Chip Quik near the pad. Solder the corner. Check the alignment. Your chip is now firmly held in place and you can solder the two rows of pads that don't have any solder using a generous amount of chip quick. Now solder the other two rows that have the corners tacked using a generous amount of Chip Quik. You can use Chip Quik and a clean iron to clear any solder bridges that have formed. It is amazing stuff. And you are done with U1. Now mount the other chips, Rs, and Cs saving the components near the chips (mostly .1 uF capacitors) for last. Now install the switch SW1, and finally the connectors. Done.

Note that this board should work with the LPC1115 as well as the LPC1114. I haven't tried it yet so I can't verify that. As soon as I do I will update this paragraph.

You can find out how to load the LPC114 with the software of your choice here. You are not limited to using Forth although we highly recommend it for ease and speed of software development.

Here are the document files for the board including schematic, parts list, and PCB parts layout.

This board is available from OSH Park for $9.00 each.

Engineering is the art of making what you want from what you can get at a profit.

Tuesday, July 29, 2014

The Software Has To Get Better

So why are we "pushing" Forth on single chips? To get you prepared to do it on an array of 144 Forth Engines on a chip.

Engineering is the art of making what you want from what you can get at a profit.

Monday, July 21, 2014

I2C RH Sensor 21May2014

This is a Relative Humidity and Temperature Sensor that attaches to the I2C Bus. It has a relative humidity accuracy of 3% a precision of .2% and a resolution of .1%. You can buy a higher accuracy version (2%) if you need it. Be sure to get the 5V version. For temperature the accuracy is .3°C and the precision is .01°C. There are two versions of the sensor. One is powered up continuously and the other just powers up for each reading. You can learn more by having a look at the family data sheet. The part number I tested the board with was the CC2D35. Any of the 5V parts in the family should work.

Soldering is not difficult (for surface mount). I normally mount the 4.7uF capacitors first and then mount the ICs. Mounting the TVS diode package before the capacitors and sensor is probably a good idea. The connector should get mounted last. You can get the parts list, schematic, and parts layout at I2C RH Sensor 21May2014 - Documentation. I also have software that will read out the sensor to 4 digits at I2C RH Sensor 21May2014 - Software For The LPC812 FISH Forth.txt. As you can tell it is designed to be run with our LPC812 board. The software is mainly a how to do it minimal package. Also note that the readout for this software is 4 digits (at room temperature and less than 100% relative humidity) with no decimal point. You can use other Forth routines to add a decimal point and add one more decimal place of resolution but I wanted to keep the software simple so it is easy to understand. For systems use you will probably want to add time outs and other things so a defective or missing sensor does not hang up the system.

This board is available from OSH Park for $3.05.

Engineering is the art of making what you want from what you can get at a profit.

Wednesday, June 25, 2014

I2C Parallel Port 8 Bit - LED 14April2014

This fun little board is mainly for those new to I2C. It gives you an easy way to write and test code that will control an I2C device and see the results visibly. I have written some code that includes initializations to help get you started. I2C Parallel Port 8 Bit - LED 14April2014 - Software for the LPC812 FISH Forth. The code runs on our LPC812 Devl board.

Code that runs on the LPC1114 chip: I2C-8LED-LPC1114.

This board is available from OSH Park for $4.08.

You can get the board documentation package here: I2C Parallel Port 8 Bit - LED 14April2014 - Documentation

Engineering is the art of making what you want from what you can get at a profit.

Wednesday, April 30, 2014

LPC812 Devl - 20 March 2014

The LPC812 MCU board in the picture plugs into, communicates with, and is powered by a USB port. It has 8 parallel port pins which can also be assigned to other functions. And opposite the USB port connector it has our standard RJ11 I2C bus connector.

You can find the document package for the board at: LPC812 Devl 20 March 2014 The board is available from OSH Park - LPC812 Devl - 20 March 2014 for $7.35.

Forth for the LPC812 is available at New FISH - LPC812 Support. There is a link to instructions on how to load the Forth into the chip at the link.

The NXP Users Manual can be found at LPC812 User's Manual.

Update: 25 June 2014 1419z

There is a problem with the 20 March 2014 version of this board. It was accepting spurious (real?) shutdown signals from the PC after about 10 days and would not power up. This happened on PCs with XP and Win 7 so it is not a specific OS problem. So it took about 30 days for me to be convinced it was a real problem. I had to see the problem twice and then investigate for about 10 days.

I designed a modified board that can be "wired" (resistor removed or added) to not respond to the shut down signal - the way everyone else does it. R17 and C22 have been added. R17 is normally NI (not installed). That disconnects the shutdown signal. As far as I can tell no one uses that signal to control power from the USB port.

You can find the documentation for this revision at LPC812 Devl 5 June 2014 - Doc. This board will be available from OSH Park for $7.33.

Further update: 24 July 2014

Upon further investigation it turns out that the difficulties I has were caused by an intermittent solder joint. And it was a very strange intermittent that worked for 10 days and then got flaky. And it did that twice. So you can use either board depending on what you like. Check the different schematics and make your choice.

Engineering is the art of making what you want from what you can get at a profit.

Sunday, April 27, 2014

New FISH - LPC812 Support

There is a new release of FISH Forth software that now includes LPC812 support and LPC1114 support. I will be announcing some new hardware to go with this software over the next week. Update: The new hardware is here.

Directions for downloading the code into any NXP processor (only some of them will work) can be found at loading FISH and other LPC1114 information.

V1.4 can be found here.

Engineering is the art of making what you want from what you can get at a profit.

Sunday, April 13, 2014

Forth Update And Some Nice Doc

Our resident software genius (ably assisted by his long distance friend Vic) has updated the FISH Forth for the LPC1114. You can find it here: No longer avalable - See bug fix version below.

No errors were fixed. We haven't found any yet. Some words to help with shifting bits were added. In addition a glossary with copious code examples has been added. And some other things. Have a look.

Update: 13 April 2014 1941z

Well we found an error with the Flashing of user code. It has been fixed. You can find the latest code at:

The prior release with the bug - v1.1 - will no longer be available.

Update: 18 April 2014 0854z

FISH is now listed on the figForth compilers page. Way to go Clyde!

Update: 27 April 2014 0246

There is a new release of FISH Forth that now includes support for the LPC812. Link at New FISH

Engineering is the art of making what you want from what you can get at a profit.

Friday, March 28, 2014

LPC1114 Devl

All the boards we have recently released

TTL To RS-232 DB9 M&F


TTL to I2C

I2C-4SW-4LED 9Sept2012

were aimed at the release of our LPC1114 Development board. Or as I like to put it the LPC1114 Devl. And what do I mean by "we" and "our" ? Well it was developed as part of a team effort. An effort our little group likes to call ATeam Forth. This board is the center of a project to reintroduce the ease of Forth programming for microcomputing. All development in Forth happens interactively. And once you have developed and tested each bit of code there is a compiler on the board that speeds up the execution of the compiled code and includes easy ways to turn it into an application.

To see what you can do with the LPC1114 have a look at:

LPC1114 Data Sheet

LPC1114 Users Manual

So what do you need to start? Well you will need a way to talk to the board. Probably over USB. That is explained at TTL to USB. That post includes links to suitable terminal programs for your PC (there are probably similar programs for Apple users - but I'm not familiar with them) and an explanation of how to get them running.

Besides the USB board/terminal program you will need the LPC1114 Devl board. You can find the documentation for that board st LPC1114 Documentation. It includes the schematic, parts layout, and parts list. OSH Park has the boards for sale for $11.55 each.

And finally you will need to put the Forth located at ATeam Forth for the LPC1114 on the board. It is easy to do using a free tool called Flash Magic. I might add that if you have an LPC Xpresso LPC1114 Board with a serial/USB interface attached to it (TX and RX pins)it will also run our Forth. It should also run on the LPC1115 Xpresso. But we haven't tested it.

But back to Flash Magic. Once you have it installed follow these steps to load your LPC1114 with ATeam Forth.
1. Communications - Select your processor "LPC1114/102". You have already found your COM port as outlined in TTL to USB. Enter that in the COM Port box. The baud rate should be 9600. Interface is "None (ISP)".
2. Erase - check the box that is labeled "Erase all Flash+Code Rd Prot" do not check any other boxes in this section.
3. Hex File - Enter the location of your Hex file in the box. There is the usual "Browse" tool to make that easy.
4. Options - only check the box "Verify after programming"

Before you start programming install jumpers JU1 and JU2 on the board. Hit the reset button. You are now ready to

5. Start

It takes about a minute to install and verify ATeam Forth. Remove JU2 - go to your terminal program (set up for your COM Port and 9600 baud, 8 bits , no parity , one stop bit) and then press reset. You will see the sign on message indicating the number of free flash blocks and the date your version of ATeam FISH Forth was created. Press the "Enter" key and you will see "ok, go fish in BASE 10". That tells you the number base you are operating in in decimal. So how did it get the name FISH? Well, it is sort of an updated figForth. So we called it FigISH. Or just plain FISH. Go FISH.

Soldering notes for the LPC1114 Devl.

There is only one difficult to solder component on the board. The oscillator. It is difficult because the pads are not exposed. To make it easy lay down a generous amount (which is not much) of Chip Quik on the pads before you attempt to solder to them. Put the Chip Quik on the board before you place the oscillator for soldering. The solder will flow under the pads because of Chip Quik's outstanding wetting/fluxing ability. And also note. ALL the pads for components have been specifically designed for hand soldering. So fire up your iron!

More about Forth

If you are not familiar with Forth, I have added Starting Forth - pdf and Thinking Forth - pdf to the sidebar. Or click the links here. Obviously if you are new to Forth, Starting Forth is where you want to start. FISH does not completely conform to the Forth in the book. But it is close enough - especially in the beginning chapters - that you can use our hardware to follow along.

Update: 12 April 2014 2320z

The latest version of FISH Forth has been released. It has some added words for doing bit shifting and a Glossary with numerous examples. You can find the download link at Forth Update and Some Nice Doc.

Engineering is the art of making what you want from what you can get at a profit.

Sunday, March 23, 2014

I2C-4SW-4LED 9Sept2012

Now that you have your I2C interface working you will need to test it out on something. I have a nice little board for that. The I2C-4SW-4LED board. You can find the documentation here. As the name implies it has 4 switches (actually 2 pin jumper headers to reduce costs) and 4 LEDs on the board, so you can talk to it with I2C and make lights blink. And/or read the switches. The board is made in such a way that you can wire to external switches and LEDs for use on a front panel of what ever device you are building. If you use external LEDs do not install LEDs on the board. Nothing bad will happen. But it may not work the way you want because of differing LED voltages.

With the three Jumpers on the board - JP1, JP2, and JP3, you can set the address of the board so that you could easily have 32 LEDs and 32 switches in a system. Or other parallel ports using the PCA8574 for other things.

Please note that the chip comes in two flavors. The PCA8574 and the PCA8574A. They differ only in their I2C base address. The PCA8574 has a base address of 40h and the PCA8574A has a base address of 70h. This fact tripped us up in initial testing. Don't let it trip you up. And note: either chip can be used on the board. So you could actually have 16 of these boards in a system. If your I2C driver could drive that many.

OSH Park has the boards for sale for $6.00 each.

Update: 28 April 2014 0907z

You can find some test code that exercises the I2C bus and blinks the 4 LEDs on the board at I2C-4SW-4LED LED-Test.txt. It is written in FISH Forth.

Engineering is the art of making what you want from what you can get at a profit.

Saturday, March 22, 2014

TTL to I2C

Since I'm using 5 volts as the standard I2C bus voltage, I need a way to translate from the 3.3 volts the MCU uses to the 5 volts the I2C bus uses. The interface needs to be bidirectional without having any switching since either the 5 volt side or the 3.3 volt side can pull the bus low. And there is no way to tell in advance which side might want to do that so a bus translator like the 74LVC2T45 will not work. I did try the the P82B96, but, despite being a very popular chip it latched up on me. Some manufacturers allude to this when they tout "no latch up" at the top of their data sheets for I2C bus voltage level translators. NXP describes how to do it with N channel MOSFET transistors in their application note AN10441. The circuit described there is what we would have called in the old days a grounded grid circuit. Today we call it grounded gate. The gate is grounded for AC despite the 3.3volt bias on it because the 3.3 volts comes from a power supply which is heavily filtered to eliminate any AC voltage on the supply. Despite being low cost I decided not to use this method because low cost transistors commonly come in an SOT23 package (which is big enough so that I can actually hand solder it). But the SOT23 package takes up a fair amount of board area by today's standards.

So I settled on the NVT2002 chip which looks like it has two transistors in the package along with disconnect circuitry which prevents translator operation if both sides of the bus aren't powered. Because the transistors are basically pass through devices they don't add much bus delay (on the order of nano seconds or less). And just to cap off the sweetness they cost a lot less than the P82B96.

To make life easier for I2C bus users I put 3 of our standard RJ11 I2C bus jacks on the board, so that if you are using 3 or fewer devices on the bus you don't need to buy doublers or triplers to daisy chain bus devices. Although you would have to use them if your bus is long in order to keep your bus capacitance below the specified maximum.

Bare boards for the I2C bus adapter are available from OSH Park for $5.15. You can find the documentation for the board (schematic, parts list, and parts layout) here.

You have a choice of powering the I2C bus with the power supply providing power to the MCU board or if your bus peripherals use a lot of 5V power you can give the TTL to I2C adapter its own power supply so as to avoid dragging down the 5 volts supplying the MCU board.

Engineering is the art of making what you want from what you can get at a profit.

Tuesday, March 18, 2014


You will need an interface to your computer if you plan to use our LPC1114 board with Forth for fun and profit. I will be writing up the '1114 in the next few days. In the mean time you can start building an interface to your computer. You can use the RS232 board if you are trying to talk to and program it with an older computer.

Or you can build the TTL to USB board if you have a more modern computer which only has USB ports. The USB board uses the FT232RL chip. Soldering the board is straight forward. So I'm not going to go into that. I will just mention that FTDI does not recommend using the Blue and White LEDs you can mount on the board in the way I use them (connected to the 5 volt supply with a 3.3 volt interface voltage). So if you mount them it is at your own risk.

Of course you are going to need some documentation to put a board together. You can get the schematic, parts list, and parts layout here. You can buy the boards from OSH Park. The price is $7.10 per board.

To communicate through the USB board you will need a terminal program. There are a number of them out there. I'm going to describe some of them. The links provided go to review pages where you can find a download link. For beginners I like Tera Term. It is easy to use. On the con side it hides the screens that you might want to play with while setting up or just watching what is going on.

For the more advanced user I would suggest RealTerm. It has everything you need but the screens will be confusing to the novice. Its specialty is binary files and difficult data.

The guys at Green Arrays like putty which is open source.

To make these programs work you will need to find out the port number of the USB port you have plugged into. Please note that the board is as the FTDI people refer to it "self powered". You will need to provide it with a power supply of at least 100 ma. I have designed a number of these for use with our system. I describe one power supply at Power Supply Digital WW. There is also a link there to a heftier supply. Note that the "WW" refers to the power transformer, which is a wall wart.

So you have your board powered up and plugged in to a USB port. How do you locate the port number? Assuming you have a Windows 7 system (I'm sorry to say I'm ignorant of Macs) go to the main Control Panel page and click on "Hardware and Sound" then "Devices and Printers". Under "Unspecified" you will see "FT2232R USB UART". Right click on the icon and you will get another (small) page. Click on "Hardware" on that page. Under "Device Functions" you will see listed your USB port. Mine says "USB Serial Port (Com5)". So "Com 5" is my port number. Your board should work with any Com Port number, but I think I read somewhere that port numbers from 1 to 5 work better in some systems. Keep plugging in your USB board until you find a good number if you are having trouble. Once you know your port number you will be ready to set up your terminal according to the instructions provided by the terminal program.

Initially when you plug the USB board into your PC it will go looking for a device driver. This can take a while. Your USB board will not show up on the device driver page until your system has a driver for the FTDI Chip. The last time my computer went looking for a device driver for the FTDI232R it took something like ten minutes for the driver to be found and installed. Get a cup of coffee. Come back. And then assist (if needed) with completion of the process.

And there you have it. You are ready to go with what ever else you plan to get up to.

Engineering is the art of making what you want from what you can get at a profit.