GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 04-Apr-2009, 06:49
kayne kayne is offline
New Member
 
Join Date: Apr 2009
Posts: 4
kayne is an unknown quantity at this point

Write a program using MiniIDE for the HC12 Motorola microprocessor


Can anyone help me write a program using MiniIDE for the HC12 Motorola microprocessor then test in in the HC12 simulator.

If you can help me though this please let me know.

Thanks
  #2  
Old 06-Apr-2009, 06:44
kayne kayne is offline
New Member
 
Join Date: Apr 2009
Posts: 4
kayne is an unknown quantity at this point

Re: Write a program using MiniIDE for the HC12 Motorola microprocessor


If i have to write an assembly language subroutine called Start, to initialise the Analog to Digital (ATD) ready to operate as required in Part 2 below for the MC68hc912D60A microprocessor.

Part 2.
Write an assembly language subroutine called TEMPIN that starts an 8 bit, left justified ATD conversion on channel 0, waits for the conversion to complete, reads the resulting data and returns the raw data reading in accumulator B. The raw data reading returned will be a positive number, $00 through to $A0 (decimal=160). This number is a measure of the temperature in steps of 0.25 C. For example an ATD value of $20 (decimal=32) equates to
32*0.25 = 8 C. Although larger numbers are possible from the ATD, the maximum range of values you can expect is 0 to 160 (0 - 40 C). Do not do any conversion in this routine

Further into the task there are other sub routine called
- scale
-initialize timer
-delay
-split
-display
-main

Am i write by assembling the following code to initalise the
HC12

START
; INIILAISE THE ANALOG TO DIGITAL CONVERTER (ATD) T
TEMPIN EQU $0200 ;Memory location for temp in
SCALE EQU $0201 ;Memory for scale
INITMR EQU $0202 ;Memory to initalise timer
DELAY EQU $0203 ;Memory for timer delay
SPLIT EQU $0204 ;Memory for converting temperature
DISPLAY EQU $0205 ;Memory for digital display
PAD0 EQU $006F ;Memory location for temperature input
PORTT7 EQU $00AE ;Memory location for alarm
PORTT0 EQU $00AE ;Memory location for degrees c or f voltage

there is a diagram of the chip in the attachment where all the ports can been seen.

if anyone can provide me some information to whether i am correct or not that would be helpful.

thanks
Attached Files
File Type: doc chip details.doc (48.0 KB, 14 views)
  #3  
Old 07-Apr-2009, 03:34
Mexican Bob's Avatar
Mexican Bob Mexican Bob is offline
Regular Member
 
Join Date: Mar 2008
Location: Chicxulub, Yucatán
Posts: 342
Mexican Bob is a jewel in the roughMexican Bob is a jewel in the roughMexican Bob is a jewel in the roughMexican Bob is a jewel in the rough

Re: Write a program using MiniIDE for the HC12 Motorola microprocessor


I've never seen anyone call an ADC an ATD. Even Freescale doesn't call it an ATD. You'll probably have better results using the industry standard terms wherever possible/available.

Checkout the app note "AN1775" for more information on using the ADC in your part. While it is not exactly what you're trying to do, it should be enough to get your ADC up and running.


MxB
  #4  
Old 08-Apr-2009, 05:01
kayne kayne is offline
New Member
 
Join Date: Apr 2009
Posts: 4
kayne is an unknown quantity at this point

Re: Write a program using MiniIDE for the HC12 Motorola microprocessor


Thanks it was a help
 
 

Recent GIDBlogProblems with the Navy (Enlisted) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Affordable Web Design & SEO Goldenwebdesign Webmaster / Web Designing Advertisements & Offers 0 11-Dec-2008 04:14
Bulk Email hosting *** .com Bullet proof hosting additional2 Web Hosting Advertisements & Offers 1 20-May-2007 13:55
bulk Email Marketing Bullet proof hosting additional2 Web Hosting Advertisements & Offers 0 08-Jul-2006 12:57
help! how can i improve my protocol design and client&server software? maisam Web Hosting Forum 0 27-Apr-2005 06:28

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 07:17.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.