Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/20/07 12:52
Read: times


 
#148544 - Programming CC2430 (8051 CPU)
hi people i'm doing a wireless sensor project using the cc2430 SoC. The general operation is that an accelerometer will pick up vibrations (upto 100Hz) and this will be digitised via the 2430 ADC, buffered using external RAM (found serial FRAM to do this) along SPI and finally wirelessly transmit this to the base station (cc2430 dev. board).

We are now at the stage to program the CC2430 and am asking for advice of how to program it exactly, i have C knowledge but none in MCU prog. domain. I'm using IAR workbench 7.20H to do the programming/compliling etc.

For peripheral programming we need a 32 MHz clock and want to initialise ADC.

The "CC2430.h" has the following for the ADC:

 SFR(  ADCCON1   ,  0xB4  )   /*  ADC Control 1  */



Looking at the cc2430 data sheet and at these corresponding registers ADCCON1:
bit 7(EOC): 0 -conversion not complete, 1-conv. complete
bit 6(ST): 0-no conv. in progress, 1- start a conv. seq, if ADCCON1.STSEL =11
bit 5-4(STSEL): start select, 00- ext trigg, 01- full spd, ..... 11- ADCCON1.ST=1
bit 3-2(RCTRL): controls 16bit num. generator
bit 1-0(-): reserved always 11.

So therefore if i want to start a conversion would i be correct in coding this in my c code:

 SFR(ADCCON1, 0x73)
// 01110011 : 0x73





List of 4 messages in thread
TopicAuthorDate
Programming CC2430 (8051 CPU)            01/01/70 00:00      
   The manual says..            01/01/70 00:00      
      Interrupts problems            01/01/70 00:00      
         The code, please.            01/01/70 00:00      

Back to Subject List