This lab covers · How to configure 3 ADC channelsfor simultaneous sampling and store the result in the FIFO. Trigger source isPWM signal. · Configure TCPWM to generate ISRof 1 second interval · Connect TCPWM terminal count toADC trigger input · Configure HPPASS SAR ADCchannels AN_A0, AN_A1, and AN_B4. Enable FIFO for result storage. · Enable Direct Sampler0,Sampler1, and Muxed Sampler0 · Select HPPASS Input Trigger 0in SAR ADC Group 0 · Set HPPASS Input Trigger 0 toHardware mode · Enable Channel ID in SARconfiguration Steps:1. Create a new ModusToolbox™ application a. From the Quick Panel,Click on Start, and then click New Application. b. Alternatively, you canchoose File > New > ModusToolbox™ Application. 2. Select a target PSoC™development kit, in the Choose BoardSupport Package (BSP) dialog, choose the Kit Name, choose KIT_PSC3M5_EVK, Click Next 3. Select ADC3 Channel Conversion CE under Peripherals and click create 4. Project structure been added to the workspace 5. Enable any TCPWM counter 6. Config TCPWM ADC trig delay compare value 7:Connect TC Out event to In trigger of ADC start sampling 8:ADC input trigger is configure on rising edge ofTC event using Trigger 0, FIFO selected with buffer 0 9:Enable Direct sampler for AN_A0 and AN_A1, EnableIndirect sampler via MUX using AN_B4, FIFO result storage configure for allsampler · User can add any direct and indirect samplerchannels · Group0 has the highest priorty and group 7 haslowest · Sampler in group sequencer are sampled at sametime once the trigger input arrives and conversation happen in sequential · Sampler 0 having highest priority and sampler11has lowest in Direct Samplers 10: Enable ADC channels using Group0 sequencer, Enablethe sampler in direct and Mux, Set input trigger and priority 11. After programming, the application startsautomatically. The result prints out every second in the terminal window. UsePSC3M5_EVK for testing 12. Connect an analog voltage up to 3.3 V to theAN_A0 (J2:1) and AN_A1 (J2:2) channels and verify the result on terminaloutput. 13. Additionally, rotate the potentiometer andverify the result as AN_A12 (AN_B4) on terminal output. 14. Terminal output result will vary from 0 to0xfff; 0xfff(4095) corresponds to 3.3 V or maximum potentiometer value.
|