![]()
|
I would like to thank Ryan Salsbury for contributing Technical questions. The code is written for the assembler that comes with the Imagecraft compiler. If anyone would like to see a specific question covered, please let me know and I will do my best. |
|
|
Basic LevelQ1. Do I need a development board? No, the CPU_3A2 will operate alone; but we do strongly recommend it if you are starting out. The CPU_3A2 has 52 pins of connections arranged as two 26-way (2x13) headers, on the bottom of the board. Without a circuit board to connect with, it can be tricky to wire to. Soldering directly to teh CPU_3A2 is not recommended as it can be damaged. The development board provides a socket mounting for the CPU_3A2 and an assortment of connections for power, RS-232 and much of the direct input/output. If you do make your own board, we recommend that you socket the CPU_3A2. This allows for full testing before adding the CPU_3A2 itself. Q2. I've received the package, What now?
Q3. I'm a beginner, Where should I start? With the CPU and development board you get a CD with some notes, data and basic tools. The tools I recommend starting with are the MiniIde assembler and the HC11boot loader utility. Once MiniIde is installed, go to options and set the assembler to asm11.exe; and check the box for compatibility. This ensures that it can handle the source file syntax and will produce valid output code. The HC11boot utility allows you to load the output files from MiniIde into the CPU module. Note that MiniIde produces *.S19 output files. Just set *.S19 in the search criteria in HC11boot. HC11boot includes a few utilities which are also included in the "code examples cpu_3a" directory of the CD. These are a good starting point because they show how to configure the CPU module and provide a framework to use to create your own programs. NOTE: In the examples given comment out the top 2 lines: HOF "MOT8" Just put a semi-collon in front of each line. (these are left over from my Cross-32 assembler) The best idea would be to start off reading switch inputs, flashing a few LEDs and timing sequences of flashes and beeps. Once you have this operational, you will have a good working knowledge of the system ie. how to create, load and run a program. This is half the battle. The next step would be to connect different input/output devices and make them operational. This could include a temperature sensor and a display. Q4. What HC11 documentation should I have? MC68HC11ERG/AD MC68HC11E Programming Reference Guide M68HC11RM/AD M68HC11 Reference Manual M68HC11E/D MC68HC11 E Family Technical Data These are available at: http://www.mcu.motsps.com/documentation/index.html Q5. Which programming tools should I use? For those of you using Windows, I would recommend MiniIDE as an editor and assembler, and my HC11boot to download the *.hex files to the CPU_1A1. For the beginner, I would recommend the Windows programs because it simplifies keeping track of files and allows both programs to be open at the same time. These programs are supplied on CD with you first CPU_3A2 purchase. Q6. What do I need to supply? A straight through male-female 9-pin RS-232 cable (the development board has a female 9-pin D connector). A 12V DC 150mA (minimum) plug pack. The development board has a 2.1mm DC power socket with center pin +ve. We can supply suitable plug-packs to New Zealand customers. We don't supply plug-packs overseas because of the weight and differences between countries. Q7. Can the Flash memory be used for data logging? Yes, BUT, you cannot execute code from flash and write to it at the same time. It gets a bit more complex. You can copy a flash write routine to RAM, then run code from RAM while the flash is written. Q8. Can the CPU_3A2 be supplied with larger Flash memory? Not on the CPU_3A2 module. It comes with a 4Mbit flash chip (512K bytes). You could add more memory off the board if required, but there are many ways to do this and each application should be considered seperately. Q9. Does the Flash memory wear-out? Yes, the flash does have a maximum number of write/erase cycles. Typically 100,000 at worst-case conditions (max temperature/voltage). Normal use would greatly extend this number. I haven't had one fail or had a failure reported yet. Q10. What about the different Flash memory chips? There are a number of manufacturers of flash memory and many different variations. We currently use an ST brand chip. This is compatible with the AMD chips. Availability of flash memory has caused us problems in the past. We started off using AMD flash (AM29F010). When this was not available we were forced to use Atmel flash (AT29C010). Unfortunately the AMD and Atmel use different programming sequences and have deferent internal sector structures. We have also used an Atmel equivalent chip made by SST (ST29EE010). All CPU_3A2 modules sold use the ST or AMD compatible chips as these are easier to work with than the Atmel and SST flash. AMD flash can be written one byte at a time in any order with any delay between bytes. The Atmel and SST flash must be written in complete 128 byte sectors with no delay between bytes. The Atmel and SST flash may be better suited to data logging than the AMD flash because of the smaller sector size (128 byte vs 16K byte) and simplified write and rewrite. Q11. How do I operate the HC11Boot loader program?
HC11Boot allows you to send HEX files to the CPU which can be written to RAM, EEPROM or Flash memory, it depends on the target addresses when you assemble or compile your program. Before you "send" a hex file you must press the reset button and "initalise" the CPU. This makes it ready to receive the hex file. Note: the two jumpers (LK1 and LK2) must be ON for this to work. When you click on initalise the progress bar moves to the right. On completion the buzzer will activate if you are using the development board (port-D4 goes high). If it does not, you most likely have a communications problem. Check the cables and com port settings see Q12 below. Once initalised, you can select a hex file and click "send". The status bar should again move. If it does not, the initalise stage probably didn't complete correctly, look for a comms problem. Using the Development Board with Buffalo:
When first powered on or reset, the TXD led pulses as
the Buffalo greeting is sent out, even if the PC is not connected.
Using the Development Board
with HC11Boot:
Notes: Q12. How do I fix HC11Boot error mesage problems?
The most common problem seems to be an error 383. Run HC11boot and select Options / Settings from the top pull-down menu. Make sure you have these settings:
The current HC11boot settings are stored in the registry.
Q13. Can HC11Boot still support the CPU_1A board?
Yes.
Run HC11boot and select Options
/ Settings from the top pull-down menu. Change the settings back to run with the CPU_3A2 board again. Q14. How do I fix a communications problem?
Unfortunately, this is the most likely problem to occur. It means that the CPU module is not communicating correctly with the PC. Each CPU module is supplied with Buffalo already installed. With Terra-Term or a similar comms terminal program set to 19200 baus, 8-bit, 1-stop, no-parity, connect and power up. When you press the reset button on the CPU module you should get the Buffalo greeting on the screen. If you are using the development board, the
Try these steps: Q15. Which terminal communication program to use?
In the past we have recommended HyperTerminal because it comes with Windows. Unfortunately, HyperTerminal is rubbish and causes far more trouble than it's worth. On some systems it does causecommunications problems. Please do not use HyperTerminal. We now recommend Terra-Term-Pro Version 2.3. Terra-Term works well. So far it's been quick and reliable. If it's not on the CPU_3A2 CD, a Google search is probably the best way to find the latest version or a good download site.
Problems with HyperTerminal: |
|
|
|
PMB home |
|
last updated: 08 September 2003 |