2 Replies - 1379 Views - Last Post: 15 May 2012 - 04:03 PM

#1 catch222  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-May 12

ARM Assembly development board - ADC and Temperature measurement

Posted 15 May 2012 - 02:50 AM

Hi, this is my first post on DiC, and I wanted to say thanks for providing this awesome community.

I'm currently working on the LPC2378 with an application board connected, the application board has quite a few components, for now let's assume it has a motor control (fan), a heater control, and an ADC which is configured to read temperature(Through a slider on the app board). The temperature of the heater may be input at any time by reading bits 8::15 of Port4. This 8-bit value represents the instantaneous temperature of the sensor.

How would I go about reading the ADC for the temperature value in ARM assembly?

Here is the code for turning my heater on(which is on bit 5 of port 4):

;==============================================================================
; Turn Heater On
;==============================================================================
heaterOn
  STMFD r13!,{r0,r5,r14}      ; Push r0, r5 and LR
  LDR R5, =FIO4PIN            ; Address of FIO4PIN
  LDR r0, [r5]                ; Read current Port4
  ORR r0, r0, #0x20
  STR r0, [r5]                ; Output
  LDMFD r13!,{r0,r5,r14}      ; Pop r0, r5 and LR
  mov pc, r14                 ; Put link register back into PC  


As far as I know I have to set a register to 8 bits, then set the register to the adc temp value, but I have no clue how to actually get the value from the ADC.

Is This A Good Question/Topic? 0
  • +

Replies To: ARM Assembly development board - ADC and Temperature measurement

#2 turboscrew  Icon User is offline

  • D.I.C Addict

Reputation: 100
  • View blog
  • Posts: 644
  • Joined: 03-April 12

Re: ARM Assembly development board - ADC and Temperature measurement

Posted 15 May 2012 - 11:28 AM

Is it this?

Maybe the chapter 27 of this is helpful?
Was This Post Helpful? 0
  • +
  • -

#3 GunnerInc  Icon User is online

  • "Hurry up and wait"
  • member icon




Reputation: 865
  • View blog
  • Posts: 2,309
  • Joined: 28-March 11

Re: ARM Assembly development board - ADC and Temperature measurement

Posted 15 May 2012 - 04:03 PM

*** Moved to Assembly ***
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1