Kirill 0 Posted August 26, 2012 Share Posted August 26, 2012 Hi, I tried latest Energia (0101E0008, Mac OS) and noticed that LiquidCrystal is not working. Possible reason: delayMicroseconds() do not doing its job well. This code gives me very different delays: void loop() { digitalWrite(14, HIGH); delayMicroseconds(2000000); digitalWrite(14, LOW); delay(2000); } Tried on MSP430G22452 and MSP430G22553. Where is the best place to report an issue to get fast fixes? Quote Link to post Share on other sites
Rickta59 589 Posted August 26, 2012 Share Posted August 26, 2012 I tried latest Energia (0101E0008, Mac OS) and noticed that LiquidCrystal is not working. Possible reason: delayMicroseconds() do not doing its job well. This code gives me very different delays: void loop() { digitalWrite(14, HIGH); delayMicroseconds(2000000); digitalWrite(14, LOW); delay(2000); } Tried on MSP430G22452 and MSP430G22553. Where is the best place to report an issue to get fast fixes? I don't think you have found a bug, delayMicroseconds expects an unsigned int. void delayMicroseconds(unsigned int us) That means the maximum value you can pass is 65535. You might want to use the delay() function for longer delays. Quote Link to post Share on other sites
energia 485 Posted August 28, 2012 Share Posted August 28, 2012 Can you tell us a bit more about what your setup is. e.g. What is the part number of the LCD, what signals do you have connected to what pins of the MSP430, etc. Robert Quote Link to post Share on other sites
Kirill 0 Posted August 29, 2012 Author Share Posted August 29, 2012 Hm, such exotic unsigned int in Arduino. Anyway, LiquidCrystal is not working. The ported version "HD44780Lib.h" works well. Cheap item from eBay. I can't post image here (anti-spam paranoia). It is two line display labeled as "1602A" and "HJ1602A" Initialization: LiquidCrystal lcd(A4, A5, A0, A1, A2, A3); Same pins work well in CCS. Quote Link to post Share on other sites
maxik 1 Posted August 29, 2012 Share Posted August 29, 2012 I've got the same display from eBay and it works well with Energia on Windows. Quote Link to post Share on other sites
energia 485 Posted August 30, 2012 Share Posted August 30, 2012 Hm, such exotic unsigned int in Arduino. Anyway, LiquidCrystal is not working. The ported version "HD44780Lib.h" works well. Cheap item from eBay. I can't post image here (anti-spam paranoia). It is two line display labeled as "1602A" and "HJ1602A" Initialization: LiquidCrystal lcd(A4, A5, A0, A1, A2, A3); Same pins work well in CCS. Do you by any chance happen to use the Serial port at the same time? Can you try the following pins? LiquidCrystal lcd(P2_0, P2_1, P2_2, P2_3, P2_4, P2_5); // LiquidCrystal(rs, enable, d4, d5, d6, d7); Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.