boyguitar1
Member level 1
Hi Everybody
Can anyone help this case ? Now I have LED Blinking freq 1.2 Hz and
I need to check status during LED Blinking…. Is it blink or not ?
then let mikroC send data 6 bits to my VB.
Now I have wrote some code below by use PIC16F877.
But still not work....:sad:
Form my code it will write H to VB ,write L to VB , …… (until 6 Bits)
So this my problem VB cannot detect.
My target:
If LED Blinking : mikro C must send HLHLHL or LHLHLH to my VB.
If LED Light : mikro C must send HHHHHH to my VB.
If LED Off : mikro C must send LLLLLL to my VB.
----------------------------------------------------------------
Or do u have other good idea ? please help..
Please help...
Thank in advance
BGT.
Can anyone help this case ? Now I have LED Blinking freq 1.2 Hz and
I need to check status during LED Blinking…. Is it blink or not ?
then let mikroC send data 6 bits to my VB.
Now I have wrote some code below by use PIC16F877.
But still not work....:sad:
Code:
void Check_Blinking_LED()
{
for(i=0;i<6;i++)
{
analog_val = Adc_Read(1); // Read analog from CH1
Delay_ms(10);
analog_val = ((analog_val *2000)/ 2046);
Delay_ms (417);
// 417 come from Time 830/2 ms = 415 ms
// But use more 415 ms to check High and Low pulse.
if (analog_val_LED_GREEN > 500)
Usart_Write('H');
else
{Usart_Write('L');}
}
}
Form my code it will write H to VB ,write L to VB , …… (until 6 Bits)
So this my problem VB cannot detect.
My target:
If LED Blinking : mikro C must send HLHLHL or LHLHLH to my VB.
If LED Light : mikro C must send HHHHHH to my VB.
If LED Off : mikro C must send LLLLLL to my VB.
----------------------------------------------------------------
Or do u have other good idea ? please help..
Please help...
Thank in advance
BGT.
Last edited: