Sign in

username:

password:



Not a member?

Search hc11



Search tips

Subscribe to hc11





Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | M68HC11 | Nmit 0020 F68HC11

Technical discussions about Freescale Microcontrollers: M68HC11. (Freescale Semiconductor is a Subsidiary of Motorola).

Nmit 0020 F68HC11 - skychan1213 - Jan 5 7:31:59 2009

I am using Nmit 0020 F68HC11microcontroller for my final year
project. I need the ADC converter to convert my input. I use com1 to
connect my microcontroller to computer. After I test my result, the
result is shown in the monitor computer, but the result is not in
hexadecimal. The result is shown as

P-040F-Y000 X1000 A-06 B-00 C-D0 S-004A

When I increase the input voltage which connected to the port E, only
the part A value will change

P-040F-Y000 X1000 A-1E B-00 C-D0 S-004A

P-040F-Y000 X1000 A-3F B-00 C-D0 S-004A

This part A value will keep increase as I keep increase the input
voltage. Can someone know how to decode this value? Or this value
already is a hexadecimal value?
My program is shown as below.

ADCTL EQU $1030 ;Define address value for ADCTL
ADR2 EQU $1032 ;Define address value for ADR2
ORG $0400 ; STARTING PROGRAM AT
ADDRESS $0400
MYADC LDAB #$21
STAB ADCTL ;INITIAL THE ADCTL REGISTER
LDAB #$1A
DELAY1 DECB ;TIMING DELAY FOR ADC CONVERSION
BNE DELAY1
LDAA $1032 ;LOAD THE RESULT TO
ACCUMULATOR A
STAA $0000 ;STORE THE RESULT TO
ADDRESS $0000
SWI ;STOP THE PROGRAM

------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )