Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

Discussion Groups | 68HC12 | Request for help with clock-cycle calculation

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

Request for help with clock-cycle calculation - jambotronic - Jul 31 4:23:44 2008

I am a newcomer to the board and I would like to ask for some
assistance on the following:

I have a 16 MHz Elektronikladen 68HC12 Compact collecting data from
all 8 of its onboard analogue channels and have set
ATDCTL4 = 0x01 (2 MHz AD clock, 18 cycles per conversion, 8 bit
mode).

The Serial Link connecting the controller to the host PC is
operating at a baud rate of 19200 bps and I am outputting ASCI to
the terminal window with the value of 6 (tabulated) of the 8 AD
channels.

I am graphing the result in time and I would like to calculate how
many times each analogue channel is updated to the screen per
second. My problem is that I do not know which specifications of the
microcontroller to base the calculations on, and if one of the
aforementioned frequencies is a limiting factor (by that I mean, are
the comms fast enough to report EVERY ADC reading, etc). Also, I
realise that the execution times of the other instructions within my
code will be a factor, but the loop is extremely simple; the ADC
port is being polled in a continuous loop:
1. Check condition of data collect bit on another port (assume to
always be set to "ADC-data collect")

2. Write 6 of the 8 ADC bit vaules to variables

3. Output these values to the terminal window with a Tab character
between each

4. Goto 1
Many thanks in advance and I appreciate any advice offered.
Sandy
------------------------------------



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