How to design a voltmeter with a Z80 CPU and display the output on a LCD????

Discussion in 'Homework Help' started by gokou, Jan 15, 2007.

  1. gokou

    Thread Starter New Member

    Jan 15, 2007
    5
    0
    I want to design a voltmeter with a Z80 microprocessor and display it on a LCD.

    I want to now how to connect the lcd to the z80.The pin connections.The lcd has 14 pins and z80 has 40.

    I must put an AC to DC converter as well and if anyone nows how to connect the pins it would be a great help.Thanks:)
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Hi,

    This is going to be a big project for you. Each of the items you need to use has a data sheet. You will need to read each one very carefully to determine how to make them work. (By the way, that is an analog to digital converter, not AC to DC converter).

    Having done that, you will know how to make the electrical connections to use the Z80 with the A to D anf the LCD display. As soon as you have written the program to control the Z80, you wil be able to read and display voltages.

    I'd get busy - just making sense of the data sheets will take a couple of weeks. Then you can ask specific questions.
     
  3. gokou

    Thread Starter New Member

    Jan 15, 2007
    5
    0
  4. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,796
    I'm sorry to rain on your parade, but the Z80 is NOT a standalone single chip microcontroller. It is a microprocessor and as such it will need some READ ONLY MMEMORY (ROM or FLASH) to hold the program code and it will need some RANDOM ACCESS MEMORY (RAM) to hold data and variables.

    If I were you I would refocus my attention on a simpler device from the 8051 family, or the AVR family, or the PIC family. At least you won't have to worry about those two kinds of memory since they are included on the chip. Is there some reason why you want to use a Z80. It was obsolete two decades ago.
     
  5. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    145
    Perhaps the obsolesence and hence simplicity (debatable) is an advantage. If that is the homework spec than that is that. If you are considering transferable skills here and the availability of resources, I too would recommend looking at something along the lines of a PIC m/c.

    Dave
     
  6. gokou

    Thread Starter New Member

    Jan 15, 2007
    5
    0
    Its for a school project an the z80 is a must.So to do that i have to have a rom and ram.Right?

    ok the next site

    http://www.ceid.upatras.gr/courses/micro/MICROZ80PERIPHERALS2.PDF

    turn to the slide 40(page 98 of the book).Is that what i want?

    I just have to add the ADC and the LCD that i said previously.Am i wrong?

    Can u help me just connect the pins of the LCD for 1st??????

    PLEASE???
     
  7. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Hi,

    Z80's do not connect directly to the outside world. You will need an interface ic to do this. I have only used a Z80 once, and that was in a TRS-80 computer, where I had to do some in-line assembler to use the pinter port.

    6502 processors had a 6522 VIA chip (versitile interface adapter) to go through. Possibly, Z80's have something like that. Or you can get a couple of 6522's and use them.

    As I have stated, you need to be the one doing the work - like understanding how to produce the signals that make the LCD display work. You also have to write the code to make the Z80 work. Have you got an assembler? Don't think there's a C compiler that works with Z80's.
     
  8. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,796
    The same set of peripheral chips available for '70s and '80s uProcessors is avaailable for the Z80. The parallel I/O port chip is called a PIO. Trust me on this you do not want to try to read the datasheet for this part and figure out how to program it it. It is a nightmare. A parallel LCD can be connected to the Z80's databus and the crontrol signals RD* and WR* are avaialable. If the LCD wants a Motorola type interface with R/W* and E-Clock then you can still do it with a bit of logic. There were several C compilers for the Z80 that ran on Z80 systems. What you may have trouble finding is a Z80 cross compiler that runs on a PC.
     
  9. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,796
    What makes you think any of us can read Greek? The document has only 42 pages -- What gives?
    Edit: I see page 98 in the internal page numbering.
    The problem with that picture is that there is no address decoder to decode the addresses that you will use for the LCD and the A/D comverter. You have two choices, either reduce the amount of ROM and RAM in your system or use I/O mapped addresses. Pay attention to the pins labeld MREQ(Memory Request) and IORQ(I/O Request). I think you need way more help then we can give you on this forum to succeed with your project.
     
  10. gokou

    Thread Starter New Member

    Jan 15, 2007
    5
    0
    Ok i talk to my professor and managed to change a the processor from Z80 to 8051.

    i found the circuit and i just want to check if this is really a voltmeter to display on LCD.

    the page is below:

    http://esd.cs.ucr.edu/labs/a2d/a2d.html
     
  11. gokou

    Thread Starter New Member

    Jan 15, 2007
    5
    0
    Don't the data from the adc pins have to connect to the P0 pins of the 8051 and not the P1 and doesn't the rd and wr have to connect to the P3.6 and the P3.7 of the 8051?

    And the INTR of the adc,is that the right position to connect to on the 8051?
     
Loading...