Micro Vibe

My Micro Hobby Projects

  • Increase font size
  • Default font size
  • Decrease font size
Home MIC80 Documents Getting stated MIC80 on Zilog ZDS

Getting stated MIC80 on Zilog ZDS

Print

 

 

This article provides a quick overview of the steps required to run the MIC80 CPM2.2 monitor on an EZ80F91 SBC mounted to the Zilog ZDS development board.
  Step 1, Setup ZDS;

Before attempting to use the MIC80 project you should build and run the example projects provided with the Zilog ZDS system. This will assure you that all of your hardware is working and give you a chance to learn how to use the Zilog IDE.

Step 2, Build the MIC80 project;

Create a new folder under the Zilog ZDS samples folder. My current project folder is "EZ80F91_Cpm2.2". Copy the two folders (include and source) from the project zip file into the new folder. Start the Zilog ZDS IDE and load the project file "eZ80-CPM.zdsproj". If you have the IDE installed in a folder other then the default install path you may have to "fix" some of the project defaults. The project should come up in "Release" mode and when the project is compiled (build all) it is set to output a 32bit hex file. The project will require the Zilog SFP flash program to load the project image file. If the project compiled we are done with the ZDS IDE program for now.

Note: The the EMAC hardware address is coded to an old 3Com NIC address. If you want to run more then one MIC80 system on the same sub-net you must edit the EMAC.inc source file and update the "E_MyHwAdr" variable with the desired hardware ethernet address.

Step 3, Flash the MIC80 project into the EZ80 SBC;

Now that we have a 32bit hex file we are ready to copy the project to the EZ80 CPU internal flash memory. To program the flash memory I use the Zilog SFP (simple flash programmer) software. The CPM system wants at least one disk to be mounted at start-up. The MIC80 CPM uses the 1Meg external flash chip on the EZ80 SBC module to simulate a read only disk. Included in the project source folder is a file named EZ80CPM.HEX that contain the disk image. The disk image file "EZ80CPM.HEX" must be flashed into the external one megabyte flash memory on the SBC using the Zilog SPF flash program. Both files can be flashed to the EZ80 SBC at the same time. If you modify the source code only the  "ez80-cpm.hex" file needs to be flashed to the EZ80 CPU internal memory. The CPM disk image used for drive "A" was produced using the Z80Emu program.

Start the SFP program and load the project file "eZ80-CPM-FULL.zfpproj". from the source folder. This project file will flash both the EZ80 CPU internal flash memory and the 1meg external memory for the CPM disk. I use the Zilog Ethernet programmer at a static IP address, you will have to adjust the SFP project setting to reflect your programmer device settings.

If all goes well both hex files will be copied to the EZ80 module. At this point we are ready to start the CPM monitor.

Step 4, Starting CPM2.2;

The MIC80 EZ80 CPM2.2 will require a console device attached to the female DB9 RS232 connector on the ZDS development board. The console is set to 115200 baud, no parity, 8 data bits, and RTS/CTS hardware handshaking. I use the PropTerm ANSI terminal project found on this site to act as a console device but any serial terminal should work. Pressing the reset button on the ZDS development board should display a CPM sign on message followed by an "A>" prompt. At this point CPM is running and waiting for a command.

The MIC80 CPM uses the 512K Byte RAM chip on the ZDS development board as a RAM disk. The disk is mounted as disk B under CPM. There is no battery backup on the ZDS development board so the RAM disk requires formatting when the system is powered up. MIC80 CPM disables the RAM chip when it is not being accessed by CPM to prevent bad code from writing to the disk memory region. To format the RAM disk run the "FRMTRAM.COM" program found on the CPM disk A. The RAM disk will survive a hardware reset. Once the RAM disk is formatted you can copy files to it using the standard CPM utilities and programs.

Step 4, Testing the Ethernet IP stack.

The current build of the MIC80 CPM monitor supports a simple IP/UDP stack. To test that the stack is working a simple "PING" test should be performed. At start-up the MIC80 CPM monitor IP stack is disabled. The stack can be started in either DHCP mode or static mode. When using static address mode the IP settings are configured using the "IPCONFIG.COM" program found on the CPM disk "A". Once the IP settings are configured use the "NETWORK.COM" CPM program on disk "A" to start the IP stack. While at the CPM "A>" prompt type "NETWORK UP" if you want to use static setting, or "NETWORK DHCP" to use DHCP to configure the IP stack. The stack takes about 10 seconds to initialize.

Once the IP stack is initialized try to "PING" one of your other computers using the "PING.COM" program found on CPM disk "A". If this works you should be ready to go.

Last Updated on Friday, 02 April 2010 06:27