Cypress Semiconductor CY8C21534 Especificaciones Pagina 31

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 69
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 30
24
sending commands for delivery to the NFS. Dynamic Host Configuration Protocol
(DHCP) was turned on so that the unit would automatically get any available IP
address from the wireless network. The IP protocol was set to auto connect on power
so that no command was needed from the MCU. The WiFly unit will be powered off
when not in use so auto-connect on power up was a viable option. The UART
communication parameters were set to 14400 baud rate with no parity bit. In
addition, the appropriate security parameters were set so that the WiFly unit could
establish a connection on the secured wireless network. There are many other
parameters that can be set for use with the WiFly, but these were the only
parameters which were needed for this project.
The setup of the Communications MCU required only the connection of the WiFly UART
terminals to the MCU pins and internal routing and programming of the MCU. Using
PSoC Designer, the pins were routed to a UART communications block. The clock for
the UART block was set to use the clock divider selection of VC3. The main clock signal
being 24 MHz is divided by a VC1 value of 2 and then divided by the VC3 value of 104.
The UART block then again divides the clock signal by eight to find its baud rate. This
was calculated to be 14423 which is within the clock tolerance to a 14400 baud rate.
Clock synchronisation of the UART communications block was set to Sync to SysClk for
best synchronisation at this speed.
The programming for the use of the UART was done in the C language in PSoC
Designer. The code was written to read which button was pressed from the Control
MCU, and then it was necessary to wait for the incoming letter O from the UART
connection signalling that that WiFly has established a TCP/IP connection. When this is
received, the program will send out a file name corresponding to the button that the
user has pressed. For the initial project the names of the files were given as file1 to
file5 representing the five days of the week. The program then waits for incoming file
size and sector count data to be delivered via the UART connection. The directory
entries for the FAT file system are prewritten in a character array, and the file size data
is used to modify the directory entry to reflect the correct file size for the file that is
being retrieved. After the array has been modified the MCU then sends out a letter S
as a start byte to signal that it is ready for the raw data. The raw data is sent to the
Vista de pagina 30
1 2 ... 26 27 28 29 30 31 32 33 34 35 36 ... 68 69

Comentarios a estos manuales

Sin comentarios