jbuchacher:
I will double check that when I get home and find out if it's not getting power. However, the SC16IS750 gets initialized properly as far as the arduino sketch can tell, based on the following portion of the setup() method
// SPI pin initialization
pinMode(MOSI, OUTPUT);
pinMode(MISO, INPUT);
pinMode(SCK,OUTPUT);
pinMode(CS,OUTPUT);
digitalWrite(CS,HIGH); //disable device
SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR1)|(1<<SPR0);
clr=SPSR;
clr=SPDR;
delay(10);
Serial.begin(9600);
Serial.println("\n\r\n\rWiFly Shield Terminal Routine");
if(SPI_Uart_Init()){ // Test SC16IS750 communication
Serial.println("Bridge initialized successfully!");
}
else{
Serial.println("Could not initialize bridge, locking up.\n\r");
while(1);
}
What I really need to do is dive down a little deeper and see what the UART initialization is actually doing under the hood, so I can troubleshoot it better. I wish the WiFly was a little more popular as the Arduino is, so I could find more working references to learn more about what I'm trying to do! Thanks for your help
Hi there,
I am using your code example for reference to use in my raspberry pi.
would you please tell me what these code lines are for?
SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR1)|(1<<SPR0);
clr=SPSR;
clr=SPDR;
Actually I am working on same kind of project and if you can help me that would be great. I am connecting my Raspberry pi with SC16iS750 chip through SPI connection as same you did in your project. And SC16iS750 with RN-131G (Wifi module) through UART.
Now my question is do you have to initialize SC16iS750 chip or it will directly put data from SPI bus to UART? I enable my SPI pins in Raspberry pi and I am getting data on SC16iS750 chip at SPI pins (MOSI and MISO) but when I check pin at TX and RX of SC16iS750 chip, I am getting just 3.3 voltage level no data. So do I have to write commands to initialize pins and registers of SC16iS750 ? IF yes, would you please share your code for reference?
my email is tsavalia@lakeheadu.ca.
I would really appreciate your help.
Hope to hear from you soon.
Thank you.