asdouf
Newbie level 4
- Joined
- Dec 18, 2009
- Messages
- 5
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- egypt
- Activity points
- 1,307
i want to send number from Pic16F877A By MikroC To Arduino but i have problem , any one Know where is the problem ???
Code Arduino
Code of MikroC
Code Arduino
Code:
#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3
#define ledPin 12
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
void setup()
{
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
pinMode(ledPin, OUTPUT);
mySerial.begin(9600);
}
void loop()
{
char c= mySerial.read();
if (c ==2)
{digitalWrite(ledPin,HIGH);}
}
Code of MikroC
Code:
char x =2;
void main()
{
uart1_init(9600);
delay_ms(1000);
trisc=0;
while(1)
{
uart1_write(x);
}
}