PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Sep 21, 2006 1:50 pm |
|
|
Quote: |
I`m using 2 microcontrolers PIC16F628A
#include <16F628.h>
|
If you're using the "A" chips, then you need to #include the 16F628A.H file.
Quote: | #define NUM_SENSORES 2
int i = 1;
while(i < NUM_SENSORES)
printf("%c",saida);
delay_ms(100);
|
The while() loop above will execute continuously. The delay_ms()
will never execute.
Quote: |
#use rs232(baud=9600,xmit=PIN_B2,rcv=PIN_B1) |
Add the ERRORS parameter to all of your #use rs232() statements.
Quote: | int saida;
saida = 0xAA; // 10110101 |
0xAA is the same as 10101010. In your comment above, you have
given the binary value for 0xBA.
My advice is to get the transmitter (PIC 1) working with a terminal
program on a PC. Don't use 0xAA as the data. Use some data that
you can see on a terminal program, such as:
saida = 'A';
or
saida = 'B'; |
|