Tutorial for AsmIDE for Dragon12 plus Trainer board with D-Bug12
Written by Michael Wuvanich
Modified by M. Mazidi with input from Chuck Burfoot
Note: Asm IDE works properly with Windows XP, Vista 32-bit, and Windows 7 32-bit but it will NOT work with Vista 64-bit or Windows 7 64-bit.
-
Install driver for your serial to USB adapter. Confirm you have the proper and updated driver for your operating system. Vista serial to USB drivers are sometimes not provided. You can easily find Vista drivers by typing the adapter’s model number followed by “Vista drivers” in Google search engine, i.e.” Prolific pl2303 vista driver. “
-
Plug in the USB part of your adapter and a balloon popup will appear near your taskbar stating your device is ready for use.
For Vista users, plug in the USB part of your adapter and notice a small balloon icon will appear near your taskbar. Write down the COM port number assigned to your adapter appearing in the balloon. The COM port number assigned to your adapter will remain the same assuming your adapter is the first device plugged into your system at boot-up.
-
XP users, get COM port number.
-
Click the start icon/ right click My Computer / manage/, Computer Management window will appear. Classic view XP users, right click My Computer icon on desktop/manage/.
-
Expand System Tools under Computer Management (local). Click on Device Manager.
-
Expand Computer name/ expand Ports/. Write down the COM port number assigned to your adapter.
Vista and Windows 7 user can also use the above method to find out which COM port is assigned to the USB port. Under Control Panel click on Device manager and you can see the COM port assigned to USB.
In the new Dragon12-USB trainer board the system automatically assigns COM port. If in case it does not, use the above method to get the COM port number.
Note: Step 3 is sometimes necessary after reboot since the COM port number assigned to your adapter will sometimes change.
-
Setup AsmIDE software.
-
Insert Dragon12-Plus trainer board CD
-
Explore CD directory and double click on Setup.bat
A Dragon12P folder should now be in your C:\Dragon12P directory.
-
Navigate to C:\Dragon12P\Examples and copy Reg9s12.h to your C:\ directory
-
Click on ASMIDE.exe and start the program.
-
Once in the program click on view/options. Choose the COM port assigned to your serial to USB adapter and check Enable the Terminal Window.
-
Click on Set COM Options and configure settings exactly as shown below. Apply/ok and proceed to the next step.
-
Click on the Assembler tab, select 6812 and configure settings accordingly.
-
Click ok to exit options.
-
Connect the serial part of your adapter to the female serial adapter located beside your Dragon board’s LCD. Power your Dragon board by connecting the power supply provided. Make sure switches SW7 next to the keypad are both LOW. Hit the reset button located on your dragon board. Your LCD should display “DRAGON12plus EVB D-Bug12 EVB MODE. “ If your LCD displays “DRAGON12plus EVB BOOT LOADER”, toggle both SW7 switches and hit the reset button again.
-
Test serial communication from Dragon12-Plus to PC. Click on the terminal tab and hit reset on your Dragon board. The message below should appear if your installation was successful.
If the message does not appear make sure the serial to USB drivers were installed properly. Confirm the COM port assigned was recorded correctly and COM settings under view/options were set and saved properly.
If you see the message below after pressing reset your board is not in EVB MODE, review step 5.
-
Run test program.
-
Click file/open and navigate to First_line.asm in C:\Dragon12P\Examples\Name_Dis
-
Modify source by entering a string, in this case Hello World.
-
Assemble modified asm file. You should receive 0 errors in the message tab.
-
Click on the terminal tab and hit reset on your dragon board. Type load in terminal window, click on the download button, and open First_line.s19. A “*” character will appear confirming the program is loading into the Dragon board’s memory.
Hit reset on your Dragon board and your new message should appear on the LCD.
8) Compiling and Running a program
Now delete everything in the AsmIDE and copy and paste Toggling LEDs on PORTB program from the www.MicroDigitalEd.com under HCS12, Dragon12 Sample Program and Support, and under the
D-Bug12 section.
http://www.microdigitaled.com/HCS12/Hardware/Dragon12-Plus-Support.htm
Save it with asm extension. (PTB_Toggle_AssemProg.asm)
Now, compile , download and run the program to see the LEDs toggle.
Appendix B in the HCS12 textbook by Mazidi & Causey shows the commands for tracing and running the program with AsmIDE and
D-Bug12.
Share with your friends: |