Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // sam3s adc characteristics: 41.7 (1058ff)
- // max adc frequency: 20mhz
- // max startup(standby -> normal mode): 12us
- // track and holding time (min): 160ns
- // settling: 200ns
- // 20mhz maximal adc clock frequency ->
- // prescaler 0 not possible (32mhz) ->
- // use 16mhz adc frequency with prescaler 1
- #define ADC_PRESCALER 1
- // 16mhz takes 192 clock cycles for 12 us ->
- // smallest possible value is 512 (32us)
- #define ADC_STARTUP ADC_MR_STARTUP_SUT512
- // 16mhz takes 2.56 clock cycles for 160ns ->
- // Tracking Time = (TRACKTIM + 1) * ADCClock periods ->
- // smallest possible value is 2 (187.5ns)
- #define ADC_TRACKTIM 2
- // 16mhz takes 3.2 clock cycles for 200ns ->
- // smallest possible value is 5 (312.5ns)
- #define ADC_SETTLING 1
- // I can't find anything about the minimum transfer period...
- // Transfer Period = (TRANSFER * 2 + 3) ADCClock periods.
- // Transfer Period of 1 -> 312.5ns
- #define ADC_TRANSFER 1
- // Alltogether, when 8 adc channels are used:
- // 32us + 8*187.5ns + 312.5*8ns = 36us
- // Maximum allowed trigger frequency is 28khz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement