Hello
We warmly suggest you to switch to mikroC PRO for PIC compiler.
If you're a registered user you'll receive PRO license key free of charge.
PRO version is in so many ways better than the version you have.
Download link:
http://www.mikroe.com/eng/products/view ... o-for-pic/
Also, I am giving you code which works
(EasyPIC6, PIC16F887):
Code: Select all
char i, error, byte_read; // Auxiliary variables
void main(){
ANSEL = 0; // Configure AN pins as digital I/O
ANSELH = 0;
TRISB = 0x00; // Set PORTB as output (error signalization)
PORTB = 0; // No error
error = Soft_UART_Init(&PORTC, 7, 6, 14400, 0); // Initialize Soft UART at 14400 bps
if (error > 0) {
PORTB = error; // Signalize Init error
while(1) ; // Stop program
}
Delay_ms(100);
for (i = 'z'; i >= 'A'; i--) { // Send bytes from 'z' downto 'A'
Soft_UART_Write(i);
Delay_ms(100);
}
while(1) { // Endless loop
byte_read = Soft_UART_Read(&error); // Read byte, then test error flag
if (error) // If error was detected
PORTB = error; // signal it on PORTB
else
Soft_UART_Write(byte_read); // If error was not detected, return byte read
}
}
For any further assistance, feel free to contact us.
Best regards,
Losic Tihomir