Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

Project Request

Return
vando ngo
giftlife

posted on 2013/07/30 01:45:01 PM CEST

Other Codes

help soft uart for arm

i want to use orther pin in soft Uart code.but not work.this code:



char i, error, byte_read; // Auxiliary variables

void main(){
UART1_Init(9600);
error = Soft_UART_Init(&GPIOA_ODR, 7, 6, 9600, 0); // Initialize Soft UART at 56000 bps
if (error > 0) {
GPIOD_ODR = error; // Signalize Init error
while(1); // Stop program
}
Delay_ms(100);




while(1)
{ // Endless loop
// Send bytes from 'z' downto 'A'
Soft_UART_Write('a');
Delay_ms(100);

byte_read = Soft_UART_Read(&error); // Read byte, then test error flag
if (error) // If error was detected
GPIOD_ODR = error; // signal it on PORTD
else
//Soft_UART_Write(byte_read); // If error was not detected, return byte read
UART1_Write(byte_read);
}
}


Uart1 is hard uart.