#include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
void main()
{
BYTE data;
M8C_EnableGInt;
DELSIG8_1_Start(3);
DELSIG8_1_StartAD();
PWM8_1_DisableInt ;
PWM8_1_Start();
while(1)
{
if(DELSIG8_1_fIsDataAvailable()==0)
{
data= DELSIG8_1_cGetData()-128;
DELSIG8_1_ClearFlag();
PWM8_1_WritePulseWidth(data);
}
}
}
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
void main()
{
BYTE data;
M8C_EnableGInt;
DELSIG8_1_Start(3);
DELSIG8_1_StartAD();
PWM8_1_DisableInt ;
PWM8_1_Start();
while(1)
{
if(DELSIG8_1_fIsDataAvailable()==0)
{
data= DELSIG8_1_cGetData()-128;
DELSIG8_1_ClearFlag();
PWM8_1_WritePulseWidth(data);
}
}
}
Comment