I try for McroC + roteus .
My pic is fine but i have "PIC18F4550 Soft_UART problem".
I don't receive any reaction whit this code and schematic. what is problem?
====================================================================
char i, error, byte_read; // Auxiliary variables
void main(){
ADCON1 |= 0x0F; // Configure AN pins as digital I/O
CMCON |= 7;
TRISB = 0x00; // Set PORTB as output (error signalization)
PORTB = 0; // No error
error = Soft_UART_Init(&PORTC, 7, 6, 9600, 0); // Initialize Soft UART at 14400 bps
if (error > 0) {
PORTB = error; // Signalize Init error
while(1) ; // Stop program
}
Delay_ms(1000);
for (i = 'z'; i >= 'A'; i--) { // Send bytes from 'z' downto 'A'
Soft_UART_Write(i);
Delay_ms(1000);
}
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
}
}
========================================================================
I but Proteus +MICROC below :
View attachment PIC18F4550_softwareUart.zip
.....................................................................
I have good result in hardware USART and other sample in microc+proteus( as same as work in real world).
so pleas help ??????????????
:idea::???::sad::evil::shock: