Professional Documents
Culture Documents
PSOC designer software. A PGA with unity gain and LCD tool box user modules are incoparated. APPARATUS: 1)Personal Computer 2)PSOC Designer Software 5.0 3)PSOC SDK 4)PSOC MiniProgrammer 5)Multimeter PROCEDURE: Software Procedure: 1)Open the PSOC Designer Software 5.0 2)In the file menu New Project Chip Level Project Give the name of the project and click OK 3)Select the Target Device as CYC29466-24PVXI 4)Check the generate a main file using .c (dot C) language and click OK 5)Choose and configure the user module tha give the PSOC Device functionality we need . The Setting are given below: USER MODULES:
1)Select an ADCINCVR from thr ADC catalog and place the ADCINCVR_1 in the ASCIO block. 2)Select the PGA from the amplifier category and place in the ADCBOO Block. 3)select the LCD from MISC category and select port_2 for the LCD port_2.
GLOBAL RESUOURCES:
1)Power setting 5.0V/24MHz 2)CPU Clock SYSClK/2 3)VC1 12 4)VC2 2
CIRCUIT CONNECTIONS:
6)Generate the Configuration files by pressing Ctrl +F6 7)Go to workspace Explorer Source File Main .C and Write the firmware for project in C
//--------------------------------------------------------------------------// C main line //--------------------------------------------------------------------------#include <m8c.h> #include "PSoCAPI.h" // part specific constants and macros // PSoC API definitions for all User Modules
void main(void) { M8C_EnableGInt; PGA_1_Start(PGA_1_HIGHPOWER); ADCINCVR_1_Start(ADCINCVR_1_HIGHPOWER); ADCINCVR_1_GetSamples(0); LCD_1_Start(); LCD_1_PrCString("ADC DATA"); while(1) { while(ADCINCVR_1_fIsDataAvailable()==0); LCD_1_Position(1,0); LCD_1_PrHexInt(ADCINCVR_1_iGetDataClearFlag()); } // Insert your main routine code here. }
BLOCK DIAGRAM:
Port_0_0 Port_0_1 Port_0_2 Port_0_3 Port_0_4 Port_0_5 Port_0_6 Port_0_7 Port_2_0 Port_2_1 Port_2_2 Port_2_3
ACBOO
2
PGA_1 GAIN
HARDWARE PROCEDURE: 1)Connect the PSOC SDK to the system by connecting the PSOC miniprogrammer 2)Dump the program by clicking Program Program part and Toggle the power 3)Test the program and take the observations for different simulation parameters. CIRCUIT CONNECTION: 1)An analog Input voltage is required on port_0_1 2)Varying this voltage will cause the value in the LCD change 3)The Below table shows the translation of the Input analog voltage to digital for signed output DC Voltage 0 1 2 2.5 3 4 5 Decimal Value -0.4096 -2458 -820 -1 819 2457 4095 Hexa equivalent F000 F666 FCCC FFFF 0333 0999 0FFF
The table shows the translation of I/P analog voltage to digital for unsigned outputs
DC Voltage 0 1 2 2.5 3 4 5 Decimal Value 0 1638 3276 4095 4195 6553 8191 Hexa equivalent 0000 0666 0CCC 0FFF 1333 1999 1FFF
2) RefMUX = Bandgap bandgap For 0.12 and below F14A 0.16 1.80 FE20 05EF AGND = 1.3V
2.85 and above 0FFF CONCLUSION: Performed the operation of the 13-bit ADC using PSOC device and observe the result at different simulation parameters.