Cypress Semiconductor CY8C21534 Especificaciones Pagina 57

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 69
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 56
Appendix 2
7(15)
write_data_init(0x00, 0x04, 0x00, 0x00); // Writes raw data
start_token(); // Address sector 512, offset 40000
Counter8_WritePeriod(0x02); // Sets period to 2 clocks
Counter8_WriteCompareValue(0x01); // Generates a 50% duty cycle
UART_CPutString("S"); // Sends 'S' to show ready for raw data
while(UART_cGetChar() == 0x00); // Waits for raw data to start coming
write_data_raw(UART_bReadRxData());
for(i=0;i<511;i++) // Writes first sector of raw data
{ // Previous line read the 512th byte
while((UART_bReadRxStatus() & 0x08) != 0x08);
write_data_raw(UART_cGetChar());
}
write_CRC();
for(j=0;j<(sectors-
1);j++)
{
start_token();
for(i=0;i<512;i++
)
{
// Writes additional sectors
while((UART_bReadRxStatus() & 0x08) != 0x08);
write_data_raw(UART_cGetChar());
}
write_CRC();
}
start_token();
// Writes remaining raw bytes after all complete sectors
for(i=0;i<(file_size_partial - 1);i++)
{
while((UART_bReadRxStatus() & 0x08) != 0x08);
write_data_raw(UART_cGetChar());
}
// Fill remaining empty space in sector after partial write
write_data_fill(file_size_partial - 1);
write_CRC();
stop_token();
Counter8_WritePeriod(0x30); // Sets period to 10 clocks
Counter8_WriteCompareValue(0x15); // Generates a 50% duty cycle
k = 0;
Loading_LED_Switch(0); // Turns off LED
Write_enable_Switch(0); // Disables write
WiFly_pwr_Switch(0); // Turns off WiFly
MCU_fin_sig_Switch(1); // Signals finish to Control MCU
}
}
}
Vista de pagina 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 68 69

Comentarios a estos manuales

Sin comentarios