I'm in the lab right now and after hooking up the o-scope and the logic analyzer, I am getting nothing from the serial port on the DE2. The Tx light blinks, but nothing is triggering and even the signal on the scope doesn't look jittery or anything when the Tx light is on. I tried changing the sensitivity levels on everything to watch for something larger than TTL, but still nothing. I will be in the lab till 12am Eastern time, so I can try things out immediately until then. I'm pretty stuck at this point. Here's what I'm using now try to send stuff over serial:
void test8_uart(void){
int uart, result;
char szHello = "\r\nAT+++\r\n"; //this 'wakes up' the phone to receive commands
char szHello2 ="ATD+15551234;\r\n"; //this is the actual command
char szRead;
//open uart
uart = open(UART_NAME, O_ACCMODE); //defined in system.h
if(!uart){
printf("failed to open uart\n");
return;
}
//write uart
if(write(uart, szHello, strlen(szHello)) == strlen(szHello)){
printf("wrote message 1 to uart\n");
usleep(1000000);
}
if(write(uart, szHello2, strlen(szHello2)) == strlen(szHello2)){
printf("wrote message 2 to uart\n");
}
close(uart);
return;
}
The only thing I can think of is that I configured something wrong in the SOPC editor. It's almost like the lines going from the FPGA aren't connected to the physical serial port. Here's what my SOPC config looks like:
img9.imageshack.us/img9/4353/sopc.png Is there anything in there that I am missing that is needed to make the uart work? Or should I use a different uart module? I can add:
Avalon-ST JTAG Interface
Avalon-ST Serial Peripheral Interface (SPI)
JTAG UART
SPI (3 wire serial)
UART (RS232 serial port) [this is the one I'm using now]
or since we have the University Program, I can also add
RS232 UART
I will be eternally grateful for your help :)