I am starting a project using a meag169PA to drive a custom LCD display, and obviously, I'd like to use the built-in LCD driver, but a couple of issues have surfaced.
1. I use the LCD driver register names in Studio 7, but I get errors when I build, saying that those register names (LCDCRB, LCDFRR, LCDCD1, etc. ) aren't recognized. I have to think that there must be an additional #include file that has these register definitions, but I have no idea what it is or where it might be. Looking online has proven to be fruitless. AVR app note for Butterfly does not show actual code - just flowcharts.
2. When I bring up the device programming dialog, I am given the choice of ISP or JTAG interface for the mega169 and AVR Dragon combination I'm using. I have both headers on my board, and both work to set/clear fuses, etc. I have SPI and JTAG bits enabled. However, when I try to debug, I get a dialog that says I need to choose a debug platform, so I select AVR Dragon, and when I select the interface dialog, I get ISP, HVpp, and debugWire. There is no JTAG option. What am I missing here?
This is my initial code:
Here's the portion that gives me errors:
LCDCRB = 0b00110000; // LCD uses sys clock, 1/2 bias,1:4 DC, seg 0-12
PRR &= 0b11101111;
LCDFRR = (1<<LCDCD2) | (1<<LCDCD1);
/* Set segment drive time to 125 µs and output voltage to 3.3 V*/
LCDCCR = (1<<LCDDC1) | (1<<LCDCC3) | (1<<LCDCC2) | (1<<LCDCC1);
/* Enable LCD, default waveform and no interrupt enabled */
LCDCRA = (1<<LCDEN);