You are here: Home DOCUMENTATION NanoCore12 NanoCore12 User Manual - GETTING STARTED

Technological Arts Inc.

Your Shopping Cart

Your Cart is currently empty.

NanoCore12 User Manual - GETTING STARTED

Article Index
NanoCore12 User Manual
1 INTRODUCTION
2 GETTING STARTED
3 HARDWARE DESIGN FEATURES
4 WRITING SOFTWARE
All Pages

2  GETTING STARTED

 2.1 HARDWARE SETUP

There are various commonly-used configurations for working with NanoCore12 modules.  Follow the directions below for the particular setup you are using.

2.11 Using With a Solderless Breadboard.

Standard RS232 version of NanoCore12:  If you're using a solderless breadboard, plug your NanoCore12 module into the breadboard.  Attach a serial cable between the TX, RX, and GROUND pins of the module (pins 1, 2, and 4, respectively) and the RX, TX, and Ground pins of a PC's Com Port (i.e. serial port),  respectively.  A suitable cable is available from Technological Arts (#SCSB36) which will plug directly into the breadboard adjacent to the serial communication pins (see Fig. 3).  If your PC does not have a ComPort, you'll also need a USB-to-Comport adapter (#USB2COM).  The first time you plug in the USB adapter, Windows will prompt you to install the driver for it, which you’ll find on the CD that came with it.  Before using the adapter, you’ll need to configure it as a Virtual Comport via the Windows Device Manager.  See Appendix D for detailed instructions on how to do that.
Apply power to the module in one of the following ways:
1) unregulated DC voltage (maximum 8V) may be applied to the Vin (+) and VSS/Ground (-) pins of the module.  These are the highest numbered pins on the module
(i.e. pins 23 and 24 on a 24-pin module, pins 31 and 32 on a 32 pin module, etc.).
2) or, regulated 5V may be applied directly to the VCC (+) and Ground (-) pins.  If you use this arrangement, make sure to leave the Vin pin unconnected.
A power cable (#PCJ1-8SB) which plugs conveniently into your solderless breadboard next to the Vin and Ground pins is available from Technological Arts.
Special TTL version of NanoCore12 (blue chip):  If you have a TTL version of a NanoCore12 module, you should use the Technological Arts USB2NCT module for power and communications.  Plug USB2NCT into your breadboard such that the two power pins plug into the breadboard’s power bus.  Then plug your NanoCore12 module into the breadboard such that the four pins line up with the last four pins of the module.  Be sure the power jumper is in place on the USB2NCT module, so that your PC’s USB port will supply 5V power to your breadboard and NanoCore12 module.
Plug a USB cable between your PC and the USB2NCT module.  The first time you plug it in, Windows will prompt you to install the driver for it, which you can download from the Resources tab on the USB2NCT web page.  Before using the Comport, you’ll need to configure it as a Virtual Comport via the Windows Device Manager.  See Appendix D for detailed instructions on how to do that.
You can now continue to section 2.2.

2.12 Using With the Docking Module.  If you have a Docking Module (e.g. Kit1 bundle), plug the NanoCore12 module into the universal 40-pin DIP socket on the Docking Module, taking care to orient it correctly (pin 1 dot on module lined up with pin 1 dot adjacent to the socket).  The socket accommodates all three sizes of NanoCore12 modules (24-pin, 32-pin, and 40-pin), so be sure to plug your module into the correct end of the socket.  Refer to Figure 7.
Attach a standard 9-pin serial extension cable (not a "Null Modem") between the Docking Module and your PC serial port.  A suitable cable is available from Technological Arts (#CX09B06).  If your PC does not have a Com port, you'll also need a USB-to-Comport adapter (#USB2COM).  The first time you plug it in, Windows will prompt you to install the driver for it, which you’ll find on the CD that came with it.  Before using the Comport, you’ll need to configure it as a Virtual Comport via the Windows Device Manager.  See Appendix D for detailed instructions on how to do that.
Use an AC-to-DC adapter ("wall wart") with a DC output voltage rating anywhere between 6 and 9 V, capable of delivering a minimum of 100 mA.  The output plug needs to be a 2.1mm diameter barrel type, with center positive.  This is the most common type available, and may be ordered from Technological Arts (#DC9V).  It is also the adapter supplied with all Kit1 bundles.
We're going to use the setup in its default 5V power mode, so double check that jumper block JB1 is "open" (i.e. the shorting plug is not in place).  Once you have connected power, you'll see that the green Power LED (D1) on the Docking Module is glowing.
You’re now ready to move continue with section 2.2.

2.13 Using With the NanoCore12 School Board.  There are three pairs of single-row receptacle strips on the School Board, corresponding to the three sizes of NanoCore12 modules available.  Plug your NanoCore12 module into the correct set of receptacle strips, taking care to orient it correctly (pin 1 dot on module lined up with pin 1 dot adjacent to receptacles).  See Figure 7.
Attach a standard 9-pin serial extension cable (not a "Null Modem") between the School Board and your PC serial port.  A suitable cable is available from Technological Arts
(#CX09B06).  If your PC does not have a Com Port, you'll also need a USB-to-Comport adapter (#USB2COM).  The first time you plug it in, Windows will prompt you to install the driver for it, which you’ll find on the CD that came with it.  Before using the Comport, you’ll need to configure it as a Virtual Comport via the Windows Device Manager.  See Appendix D for detailed instructions on how to do that.
Use an AC-to-DC adapter ("wall wart") with a DC output voltage rating anywhere between 6 and 9 V, capable of delivering a minimum of 100 mA.  The output plug needs to be a 2.1mm diameter barrel type, with center positive.  This is the most common type available, and may be ordered from Technological Arts (#DC9V).  It is also the adapter that is supplied with all Kit2 bundles.
We're going to use the setup in its default 5V power mode, so double check that jumper block JB1 is "open" (i.e. the shorting plug is not in place).  Once you have connected power, confirm that the green Power LED (D1) on the School Board is glowing.
You’re now ready to move on to section 2.2.

2.2 VERIFYING YOUR SETUP

At this point, you should have your hardware all set up and ready to test.  You’ll do that by using a terminal program on your PC, acting as the user interface to the Demo program that has been pre-loaded at the factory into each NanoCore12 module.
To use the Demo program, you will need to launch a terminal program on your PC.  Some examples of terminal programs you can use are:  HyperTerminal (included with Windows), TeraTermPro (free download from Sourceforge), the terminal program integrated into MiniIDE, and the terminal program integrated into ImageCraft's C compiler (ICC for CPU12).  For help setting up a connection with any of these programs, see Appendix D in this manual.
Launch your selected terminal program and set up a connection to the com port you are using, configuring it for 9600 baud, no parity, 8 data bits, one stop bit.  For handshaking, select "none".  Now power up your module, as described above, making sure the Load/Run switch is in the Run position.  You should immediately see a menu displayed in your terminal window.  If you are using a Docking Module or School Board, you should also see one of the red LEDs blink a couple of times.  If you don't see it, press the Reset button on the Docking Module or School Board.  If you are not using the Docking Module or School Board, you'll need to momentarily bring the RESET pin on the module to "logic low" (i.e. temporarily ground it).  Refer to your module's data sheet to determine which pin is the RESET pin.
Now press the Enter key on your PC keyboard, and NanoCore12 will re-transmit the Demo Menu to your terminal window.  If you got this far, it means that your module is successfully powered up and running, and communication is working in both directions (ie. transmit and receive).

 2.3  EXPLORING THE DEMO PROGRAM

If you are using a solderless breadboard or your own board, you'll need to wire up a few simple circuits to see the results of some of the Demo Program commands.  Refer to Appendix E for details.
If you are using the Docking Module or School Board, the demo circuits are already in place, so you can proceed:
•Type the digit 0 repeatedly and observe that LED D2 toggles on and off.
•Type the digit 1 repeatedly and observe that LED D3 toggles on and off.
•Type the letter F to flash LED D2 to twice.
Typing E, H, M, or T will cause a hexadecimal number to be displayed, whose bit values represent the logic levels of the respective port pins.  The pins which are not connected to external circuitry (i.e. floating pins) will assume a logic 1 level, due to internal pullup resistors.  You can connect input port pins to Ground or +5V with jumper wires and observe the change in value when you type the E, H, M, or T commands (as appropriate for the input port you want to observe).  If you attach a small piezo speaker between the PT0 pin and Ground, you’ll here two beeps whenever you type F to flash the LED.  This is because the routine actually generates an audio tone, but the LED turns on and off so fast that it appears steady to the eye.

 2.4     LOADING A NEW PROGRAM INTO MEMORY

As mentioned earlier, each NanoCore12 module is shipped from the factory with a small Serial Monitor program residing in a protected block of flash memory.  It is this Serial Monitor that facilitates the loading of user programs into NanoCore12.  Since the Serial Monitor implements a compact binary command set, it requires some sort of user-friendly interface on the host machine.  Technological Arts has developed a Graphical User Interface called uBug12 for this purpose.  It was written in Java, and can be used on Windows, Mac, and Linux platforms.  Freescale’s CodeWarrior Compiler/Assembler/IDE can also be used with the Serial Monitor, and will be covered in a later chapter.
2.41  Using uBug12.  Following reset, the startup code detects the position of the Load/Run switch to determine whether to run the monitor or jump to the user program.  If the switch is in the Load position, the Serial Monitor is activated.  To use the Serial Monitor you'll first need to install and launch uBug12.  If you don't already have it, you can download it from the Support Library, at http://support.technologicalarts.ca/docs/uBug12/.  Be sure to also download the manual that is in the same directory.
2.42  Establishing a Serial Port Connection.  Once you have launched uBug12, place the switch in the Load position and reset your NanoCore12.  Then type the command con 1 to establish communication between uBug12 and NanoCore12 on comport 1 of your PC.  If you're using a com port other than 1, substitute the correct number (eg. con 3 if using com port 3).  After a second or two, a message will appear in the uBug12 display window showing that the connection was successful.
2.43  Loading a Program.  Loading a new program into memory is a two-step process--  first you erase the program “Flash” memory and then you load in the new program.  
Here's how to do it:
Type fbulk and press enter.
Then type fload and press enter.
When the file browser pops up, select the s-record file you want to load, and click OK.
After loading has finished, move switch SW2 to the Run position and reset NanoCore12.
If the program you just loaded uses the serial port (like the Demo Program, for example), you can just type the command term in uBug12 to launch a TeraTermPro window (assuming you have previously installed it).  If not, close uBug12 and open the terminal program you used in section 2.2, above.
For a list of all uBug12 commands, type help at the command prompt.  Other commands are covered in more detail in the uBug12 manual.  One nice feature you’ll discover is command line history.  Use the UP and DOWN arrows on your keyboard to recall previously typed commands.  You can then edit them, as needed, before hitting <ENTER>.

 2.5    EXAMPLE PROGRAMS

We’ve included a few example programs in the Support Library at http://support.technologicalarts.ca/docs/NanoCore12/Code to give you a starting point.  There are some examples in Assembler, some in BASIC, and some in C.  The source code is included, so you’re free to modify them all you want!  To just load them and try them out, use uBug12 to load the .s19, .s2, or .sx file included with each example.  Those are the output files containing the s-records that uBug12 sends to the Serial Monitor for programming into flash.