Chameleon-PIC Nurve Networks, Chameleon-PIC Datasheet - Page 236

MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)

Chameleon-PIC

Manufacturer Part Number
Chameleon-PIC
Description
MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)
Manufacturer
Nurve Networks
Datasheet

Specifications of Chameleon-PIC

Processor To Be Evaluated
PIC24
Data Bus Width
16 bit
Interface Type
USB, VGA, PS/2, I2C, ISP, SPI
Operating Supply Voltage
3.3 V, 5 V
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
#endif
#if DEBUG_XMODEM >= 1
#endif
#if DEBUG_XMODEM >= 2
#endif
#if DEBUG_XMODEM >= 2
#endif
#if DEBUG_XMODEM >= 2
#endif
case XSTATE_SEND_ACK:
case XSTATE_EOT:
NTSC_Term_Print("DATA:");
NTSC_Term_Char( 0x0D );
for (index = 0; index < 128; index++)
// add bytes read
xbytes_read += 128;
// read the checksum
while (1) { ch = UART_getc(); if (ch != -1 || ch == CHR_CTRLZ) break; } // end while
xchecksum = ch;
NTSC_Term_Char( 0x0D );
sprintf(sbuffer,"Checksum: Sent=%d, Calc=%d\r",xchecksum, xchecksum_computed );
NTSC_Term_Print( sbuffer );
NTSC_Term_Char( 0x0D );
// send the ACK (test if packet was good later)
xstate = XSTATE_SEND_ACK;
} break;
{
NTSC_Term_Print("XSTATE_SEND_ACK");
NTSC_Term_Char( 0x0D );
NTSC_Term_Print("S:ACK");
NTSC_Term_Char( 0x0D );
_delay_ms ( 100 );
// send ACK and wait
UART_putc( CHR_ACK );
_delay_ms ( 100 );
// wait for a packet..
xstate = XSTATE_RECEIVE_PACKET;
} break;
{
NTSC_Term_Print("XSTATE_EOT");
NTSC_Term_Char( 0x0D );
NTSC_Term_Print("S:NAK");
NTSC_Term_Char( 0x0D );
// send NAK, wait for another EOT
UART_putc( CHR_NAK );
// wait for result
while (1) { ch = UART_getc(); if (ch != -1 || ch == CHR_CTRLZ) break; } // end while
// test for final EOT
if (ch == CHR_EOT )
{
// wait for next byte
while (1) { ch = UART_getc(); if (ch != -1 || ch == CHR_CTRLZ) break; } // end while
// insert into buffer (if still room?)
if ( (index + (xpacketnum-1)*128) < buffer_size )
// update checksum
xchecksum_computed += ch;
// test for printable
if ( (ch >= 32 && ch <= 127) || ch==0x0D)
else // non-printable character
} // end for index
file_buffer[ index + (xpacketnum-1)*128 ] = ch;
{
NTSC_Term_Char( ch );
VGA_Term_Char( ch );
} // end if printable
{
// print something for place holder?
//NTSC_Term_Char( '.' );
//VGA_Term_Char( '.' );
} // end else non-printable
// possible end of transmission
// packet was good, please send another?
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
236

Related parts for Chameleon-PIC