LM35 lcd, please help

I posted this on your other posts. The pins can be used bidirectionally but your code has to properly address that and you need to use the selects properly. I highly recommend you start by reading the forum guidelines and do some tutorials on multi chip processors that use external memory.

Learn what chip select is, the E on motorola type processors, RD\ and WR\ pins do. Also study the bidirectional buss and how it is implemented. If you do not want to go to all that work simple use the internal 10 bit A/D then shift the result 2 places to the right leaving you 8 bits. Look at some schematics on the Z80, 8085, 6502 and other similar processors. These have no on chip memory or I/O. That is the type of system your A/D was designed for.

@myproject1, please stop cross-posting.

Hi,
Is it me or is it all the cross posting and deleted posts!!!!!!

Where is the code?

Where is the schematic?

What are you guys talking about?

Tom... :grinning: :+1: :coffee: :australia:

1 Like

No it is not you it is totally confusing. The OP wants to use a 8 bit A/D designed for a parallel microprocessor bus with an Arduino. There are many A/Ds he can use both I2C and SPI but he is insistent on using the part not designed for the Arduino interface. I also do not Think he understands Google or what he is trying to do.

It would appear to be a "final project". As such, the OP may have been given insufficient/poor/wrong/no project oversight, and we are left to educate/assist him over the unfortunate chasm he is about to fall into. I walked away already, but it occurs to me that he doesn't know what he doesn't know, which we see repeatedly in project threads here that persist but fail to converge on a solution.
Succinctly, "you cannot build a city bus on the back of a moped".

1. Build the following setup (Fig-1) using Arduino UNO.


Figure-1:

2. Try the following Sketch (untested)

#include<LiquidCrystal_I2C.h>
#include<Wire.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); //or 0x3F

void setup()
{
  Serial.begin(9600);
  Wire.begin();
  lcd.begin();//or lcd.init();
  lcd.backlight();
  lcd.setCursor(0, 0);  //DPos (0-15), LPos (0-1)
  //----------------------
  Set directions of DPin - 6 to 13 as input
  Set directions of A0, A1 as output
  Assert HIGH on A0, A1
}

void loop()
{
  lcd.setCursor(0, 0);  //DPos (0-15), LPos (0-1)
  Start ADC by asserting LOW on A0
  delayMicroseconds(200);  //conversion delay
  Assert HIGH on A1
  delayMicroseconds(200);  //conversion delay
  //----------------------------
  Assert LOW on A1
  Read Data from DPin-8 to DPin-7 and save in y
  Assert HIGH on A1
  //--------------------------------------------
  Compute temperature from y using this equation:
  float myTemp = 100*(5/1023.0)y;
  //---------- show myTemp on LCD
  lcd.print(myTemp, 2);
  delay(1000);
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.