Hi
Im using TMS570LS1224. I need to send some data to the computer but all the SCI pins, I2C and SPI are being used for the encoders or for the PWMs.
I have one and a half CAN free but I did not find any converter to USB
So... I was thinking on using bit bang or pulling to create a TX UART pin to connect it to the PC via bluetooth
So here are my two questions:
do any fo you have a bit bang code for TX??
how can I use the timers for that?? how can I do this but for a TX pin and using timer?
INTCONbits.TMR0IF = 0; //clear interrupt flag
TMR0H = 0xF5; // TMROH must be written first
TMR0L = 0xFC; // F63B=63035 cambia a F5FC
if ((rx1_tick==rx1_oc) && (rx1_inprocess==1)) // llegamos al OC?
{
if ((rx1_i > 0) && (rx1_i < 9))
{
rx1_temp >>= 1;
if (PORTBbits.RB1==1) { rx1_temp |= 0x80;}
rx1_oc+=31; // Calula el proximo valor
rx1_i--; // Decrementa contador de Bit
}
else
{
if (PORTBbits.RB1==1) { rx1_data_ok = 1;}
else {rx1_data_ok=0; }
rx1_tick=0; // Inicializamos contador
rx1_data=rx1_temp;
rx1_inprocess=0;
INTCON3bits.INT1IE=1; // Habilita nuevas Interrumpciones
}
} //Fin RX1
Thanks!!