Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ========================================
- *
- * Copyright YOUR COMPANY, THE YEAR
- * All Rights Reserved
- * UNPUBLISHED, LICENSED SOFTWARE.
- *
- * CONFIDENTIAL AND PROPRIETARY INFORMATION
- * WHICH IS THE PROPERTY OF your company.
- *
- * ========================================
- */
- #include "project.h"
- #include "stdio.h"
- int main(void)
- {
- ADC_Start();
- UART_Start();
- int x;
- int y;
- CyGlobalIntEnable; /* Enable global interrupts. */
- /* Place your initialization/startup code here (e.g. MyInst_Start()) */
- for(;;)
- {
- ADC_StartConvert();
- ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);
- x=ADC_GetResult16(0);
- int y=ADC_CountsTo_mVolts(0,x);
- UART_PutString("y");
- CyDelay(100);
- /* Place your application code here. */
- }
- }
- /* [] END OF FILE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement