LCD on Attiny2313

I´ve built a Controlling-Unit for an UV-Exposure, with an Arduino UNO R3. Now I would like to convert the code to an ATTiny2313. The problem is, that the LCD-Library doesn´t work! If I try to upload it, I only get an error. Isn´t it possible to use an Arduino-Library on a ATTiny2313? (I am sorry for my bad English :blush:)

To get help you will probably need to supply some additional information.

  • What core are you using for the tiny2313?
  • What version of the Arduino IDE are you using?
  • What version of the LCD library are you using?
  • Post your code that is causing the error message.
  • Post what the specific error message are you getting.

It is likely you are running out of program memory for the upload. What size is the sketch compiled and how much Flash ram has the 2313 got?

marco_c:
It is likely you are running out of program memory for the upload. What size is the sketch compiled and how much Flash ram has the 2313 got?

The 2313 has 2K of flash and 128 bytes of ram

LCD-Library doesn´t work!

Doesn't compile, upload or run? They are different issues but I suspect you need a set of core files for the 2313 if they exist.


Rob

I am using an Arduino UNO R3 as ISP, an ATTiny 2313-20PU with 2K memory, and the Arduino IDE Version 1.0.1. The following core is used: Google Code Archive - Long-term storage for Google Code Project Hosting.

The code is the normal Hello-World Application from the examples:

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
}

The problem appears when the IDE tries to compile the code. I always get the following message:

In file included from HelloWorld.cpp:39:
C:\Program Files (x86)\Arduino IDE\libraries\LiquidCrystal/LiquidCrystal.h:82: error: conflicting return type specified for 'virtual size_t LiquidCrystal::write(uint8_t)'
C:\Program Files (x86)\Arduino IDE\hardware\tiny\cores\tiny/Print.h:71: error: overriding 'virtual void Print::write(uint8_t)'

Please give this a try...
http://arduino-tiny.googlecode.com/files/arduino-tiny-0100-0014.zip

And please report back if it works.

Thank you Coding Badly for your advice! I guess it works now, because there is no error if I try to compile the sketch, but the code is to big (2308 Bytes doesn´t fit on a 2k processor :~). Maybe I will go to buy an Atmega and retry it. However thank you for your help!

Thank you for the follow-up.

Bummer about the code size. Those 2313s are a pain that way. After several years I still have not found a use for the single 2313 I own.