Download CodeVisionAVR User Manual - La documentation de Thierry
Transcript
CodeVisionAVR For the Asynchronous, Synchronous and Infrared Module, the following specific options are available: The Data Bits option specifies the number of data bits in a data frame: 5 to 9. The Stop Bits option specifies the number of stop bits in a data frame: 1 or 2. The Parity bit in a data frame can be: • Disabled • Even • Odd. If the Multi-processor Comm. Mode option is enabled, a dedicated bit in the frame is used to indicate whether the frame is an address or data frame. If the Receiver is set up to receive frames that contain 5 to 8 data bits, the first stop bit is used to indicate the frame type. If the Receiver is set up for frames with 9 data bits, the ninth bit is used for this purpose. The Baud Rate list box allows to select the communication data rate. The CodeWizardAVR automatically calculates the values for the BSEL and SCALE, for the current Baud Rate and Peripheral Clock values. The Real Baud Rate and Error are displayed. The Receiver, respectively Transmitter, can be activated using the Receiver Enabled, respectively Transmitter Enabled check boxes. The USART can generate several types of interrupts: • Receive Complete Interrupt • Transmit Complete Interrupt • Data Register Empty Interrupt. Each type of interrupt can be individually enabled and its priority set, using the corresponding list boxes. If buffered interrupt driven serial communication will be used, the sizes of the Receiver, respectively Transmitter, buffers can be specified using the Receiver Buffer Size, respectively Transmitter Buffer Size edit boxes. In order to allow receiving, respectively transmitting data using the USART, the CodeWizardAVR will define the getchar_usartpn, respectively putchar_usartpn functions, where p is the I/O port letter and n is the USART number in the port. One of the USARTs can be chosen as the default communication device to be used by the getchar, respectively putchar, Standard C Input/Output Functions by enabling the Default USART for 'getchar', respectively the Default USART for 'putchar' options. In this situation the standard getchar and putchar functions are redefined in the generated program. For interrupt driven serial communication, some additional global variables will be declared during code generation. The receiver buffer is implemented using the global array rx_buffer_usartpn. The global variable rx_wr_index_usartpn is the rx_buffer_usartpn array index used for writing received characters in the buffer. The global variable rx_rd_index_usartpn is the rx_buffer_usartpn array index used for reading received characters from the buffer by the getchar_usartpn function. The global variable rx_counter_usartpn contains the number of characters received in rx_buffer_usartpn and not yet read by the getchar_usartpn function. If the receiver buffers overflows the rx_buffer_overflow_usartpn global bit variable will be set. © 1998-2015 HP InfoTech S.R.L. Page 634
Related documents
CodeVisionAVR User Manual
CodeVisionAVR User Manual
JARDUINO MANUAL DE USUARIO v1.2 beta
Xvhu#Pdqxdo# - book.isito.kg(0)
Full report - ECE - Cornell University
ThaiEasyElec - 2.8-inch TFT Touch Shield -EN
OLED Display User Manual ER-OLED032-1 Series
UG-5664ASYDF01 Evaluation Kit User Guide
SERVICE MANUAL MU-A18WV - MU-A24WV - MU-A30WV
"user manual"