what's wrong with this code? i test it to proteus 8 its perfectly working but in the real hardware not working
here is my code compile in mikroC pro
testing in proteus
bad output in real hardware
please any help will be appreciated
DIGITAL INPUT OF PIC16F628A
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: DIGITAL INPUT OF PIC16F628A
Hi,
Can you please attach your project in small zipped form how could I will be able to exam it?
Please note that Proteus is not fully supported software by mikroElektronika.
Best regards,
Aleksandar
Can you please attach your project in small zipped form how could I will be able to exam it?
Please note that Proteus is not fully supported software by mikroElektronika.
Best regards,
Aleksandar
Re: DIGITAL INPUT OF PIC16F628A
thanks Aleksandar.Mitrovic for your quick response of my post
actually the project is interfacing PIC to VB.net
here is my code
im using PICPGM programmer software and JDM programmer
here is the screenshot of successfully program in PICPGM software
here is the output when i press the button, using MikroC UART Terminal
please i really need help
actually the project is interfacing PIC to VB.net
here is my code
im using PICPGM programmer software and JDM programmer
here is the screenshot of successfully program in PICPGM software
here is the output when i press the button, using MikroC UART Terminal
please i really need help
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: DIGITAL INPUT OF PIC16F628A
Hi,
I apologize for long waiting on answer.
I tested this code on EasyPIC v7 development board with internal oscillator 4MHz and its working:
Note that if you are using this board set J17 in VCC and all pins which you use in PULL DOWN position.
Best regards,
Aleksandar
I apologize for long waiting on answer.
I tested this code on EasyPIC v7 development board with internal oscillator 4MHz and its working:
Code: Select all
void main() {
CMCON = 0x07;
PORTA = 0x00;
TRISA = 0x0F;
UART1_Init(9600);
Delay_ms(100);
UART1_Write(13);
UART1_Write(12);
while (1){
//PORTA
if (RA0_bit == 1){
UART1_Write_Text("RA0");
Delay_ms(1000);
}
if (RA1_bit == 1){
UART1_Write_Text("RA1");
Delay_ms(1000);
}
if (RA2_bit == 1){
UART1_Write_Text("RA2");
Delay_ms(1000);
}
if (RA3_bit == 1){
UART1_Write_Text("RA3");
Delay_ms(1000);
}
if (RA4_bit == 1){
UART1_Write_Text("RA4");
Delay_ms(1000);
}
}
}
Best regards,
Aleksandar
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: DIGITAL INPUT OF PIC16F628A
Hi,
I apologize for long waiting on answer.
I tested this code on EasyPIC v7 development board with internal oscillator 4MHz and its working:
Note that if you are using this board set J17 in VCC and all pins which you use in PULL DOWN position.
Best regards,
Aleksandar
I apologize for long waiting on answer.
I tested this code on EasyPIC v7 development board with internal oscillator 4MHz and its working:
Code: Select all
void main() {
CMCON = 0x07;
PORTA = 0x00;
TRISA = 0x0F;
UART1_Init(9600);
Delay_ms(100);
UART1_Write(13);
UART1_Write(12);
while (1){
//PORTA
if (RA0_bit == 1){
UART1_Write_Text("RA0");
Delay_ms(1000);
}
if (RA1_bit == 1){
UART1_Write_Text("RA1");
Delay_ms(1000);
}
if (RA2_bit == 1){
UART1_Write_Text("RA2");
Delay_ms(1000);
}
if (RA3_bit == 1){
UART1_Write_Text("RA3");
Delay_ms(1000);
}
if (RA4_bit == 1){
UART1_Write_Text("RA4");
Delay_ms(1000);
}
}
}
Best regards,
Aleksandar
Re: DIGITAL INPUT OF PIC16F628A
thank you so much Aleksandar.Mitrovic your very helpful answer
now its working...
now its working...
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: DIGITAL INPUT OF PIC16F628A
Hi,
Your welcome.
I'm glad that I was able to help you.
Regards,
Aleksandar
Your welcome.
I'm glad that I was able to help you.
Regards,
Aleksandar