Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CodeVision AVR 1.25.7, user manual.pdf
Скачиваний:
236
Добавлен:
12.08.2013
Размер:
1.22 Mб
Скачать

CodeVisionAVR

5.17 Setting the ATmega169/329/3290/649/6490 LCD Controller

By selecting the LCD Controller tab of the CodeWizardAVR, you can specify the configuration of the LCD controller built in the ATmega169/329/3290/649/6490 chips.

The ATmega169V/L on chip LCD controller can be enabled by checking the LCD Enabled check box. By checking the LCD Low Power Waveform check box, the low power waveform will be outputted on the LCD pins. This allows reducing the power consumption of the LCD.

If the LCD Frame Complete Interrupt check box is checked, the LCD controller will generate an interrupt at the beginning of a new frame. In low power waveform mode this interrupt will be generated every second frame. The frame complete interrupt will be serviced by the lcd_sof_isr function.

The LCD Duty Cycle list box selects one of the following duty cycles: Static, 1/2, 1/3 or 1/4. The LCD Bias list box selects the 1/3 or 1/2 bias. Please refer to the documentation of the LCD manufacturer for bias selection.

The Clock Source list box selects the system clock or an external asynchronous clock as the LCD controller clock source.

The Frame Rate spin edit allows specifying the LCD frame rate.

The LCD Frame Rate Register (LCDFRR) is initialized based on the frequency of the clock source and the obtainable frame rate, that is as close as possible to the one that was specified. The Frame Rate Error is calculated based on the specified Frame Rate and the real one obtained from LCDFRR.

The Used Segments list box setting determine the number of port pins used as LCD segment drivers. The Contrast Control list box specifies the maximum voltage on LCD segment and common pins VLCD. The VLCD range is between 2.60 and 3.35 Vcc.

© 1998-2007 HP InfoTech S.R.L.

Page 216

CodeVisionAVR

5.18 Setting the LCD

By selecting the LCD tab of the CodeWizardAVR, you can specify the LCD configuration.

Using the LCD Port list box you can specify which port is used for connecting the alphanumeric LCD. The Chars./Line list box allows you to specify the number of characters per display line.

This value is used by the lcd_init function.

The LCD can be accessed using the standard LCD Functions.

© 1998-2007 HP InfoTech S.R.L.

Page 217

CodeVisionAVR

5.19 Setting the USB Controller

By selecting the USB tab of the CodeWizardAVR, you can specify the configuration of the USB controller for the AT90USB646, AT90USB647, AT90USB1286 and AT90USB1287 chips.

The USB controller can operate in two modes: Device and Host, specified using the Operating Mode list box.

The operation of the USB controller in both modes and the various settings for them are described in detail in the AT90USB datasheet.

© 1998-2007 HP InfoTech S.R.L.

Page 218

CodeVisionAVR

5.20 Setting Bit-Banged Peripherals

By selecting the Bit-Banged tab of the CodeWizardAVR, you can specify the configuration of the peripherals connected using the bit-banging method.

If you use the DS1302 RTC, you must select the DS1302 tab.

Using the Port list box you can specify which port is used for connecting with the DS1302.

The I/O Bit, SCLK Bit and /RST Bit list boxes allow you to specify which port bits are used for this. The DS1302’s trickle charge function can be activated by checking the Trickle Charge|Enabled check box.

The number of diodes, respectively the charge resistor value, can be specified using the Trickle Charge|Diodes, respectively Trickle Charge|Resistors, list boxes.

The DS1302 device is accessed through the Maxim/Dallas Semiconductor DS1302 Real Time Clock Functions.

© 1998-2007 HP InfoTech S.R.L.

Page 219