Decimal to Hex using memory

Discussion in 'Embedded Systems and Microcontrollers' started by somewhatattractivenerd, Jan 6, 2014.

  1. somewhatattractivenerd

    Thread Starter New Member

    Jan 6, 2014
    2
    0
    I'm building a programmer for 2716/2508 EPROMs, though input is manual at this point, after a I build I programmer, I will program the 68000 to receive data serially and automate the process.

    I require a decimal to hex converter, though the ttl devices seem expensive.

    Would it work to program an eprom at location "0000 0000" with the equivalent 7 segment display output "x111 1110"? Which should be 0, and so fourth.

    Thanks guys!
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,718
    4,788
    You seem to be going in several directions all at once.

    You want to build a programmer for some EPROMs. Okay.

    What do you need the decimal to hex converter for?

    Where does a 7-segment display come into play in all this?

    Please describe what it is that you are planning to do with these EPROMs. It seems like you are talking about something pretty specific, but expecting us to read your mind and simply know what you are trying to accomplish.
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,429
    3,360
    As WBahn points out, your query generates more questions from lack of information.
    Let's start over with the big picture.
    What are you trying to do?
    What are you going to do with 2716 EPROMS?
     
  4. somewhatattractivenerd

    Thread Starter New Member

    Jan 6, 2014
    2
    0
    I am attempting to build a serial EPROM programmer that runs off a Motorola 68000 mpu. But to program the original program I require to manually address and input data to the EPROM that the serial software will be running off.

    To aid the process and make entry quicker "instead of converting my code to binary" I wish to use a Hexadecimal display for data address and data.
     
  5. MrChips

    Moderator

    Oct 2, 2009
    12,429
    3,360
    Question #1: Why are you programming a 2716 EPROM? These are obsolete.

    Question #2: Why are you using Motorola 68000? This is an obsolete chip.

    Question #3: Do you fully understand the difference between binary, hexadecimal and decimal?

    An EPROM programmer requires binary address and data. You can choose to display the memory address and data in what ever representation you wish.

    There are 10 types of people in the world, those who understand binary and those who don't.
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,718
    4,788
    Between your two posts, it seems that you have some pretty significant misunderstandings of what you need to do in order to accomplish what you want. If I understand you correctly, you want to build an EPROM programmer that uses a 68000 CPU and for which the program for the programmer itself is stored in an EPROM.

    That means that the contents of this first EPROM has to be the program that will run on the 68000. That means that it must consist of valid 68000 instructions and data.

    That is completely at odds with the notion of programming the 7SEG encoding of the digit 0 at EPROM address 0.

    Reading between the lines, it sounds like you want to make two EPROM programmers. The first is based on no programmable logic at all and is operated manually. This one will, hopefully, only be used once to program an EPROM for the MPU-based programmer. Since it will only be used once, keep it as simple as possible.

    If I were doing this (and thinking about it as I type, so I might well overlook something critical), I would probably use a counter IC that I could reset to 0 and that I could increment with a pushbutton. I'm assuming that the program is stored starting at memory location zero. If it was an 8-bit counter I would probably use it for the lower 8-bits of the address and use slide switches for the upper address bits. I would put LEDs on each of the counter outputs so that I could determine what address was being loaded. I might or might not put them on the slide switches. I would then have 8 slide switches for the data value. Finally, I would have whatever minimal logic would be needed to generate the data load sequence at the press of a button.

    Since this is only going to be used once, I would not bother with putting in hex displays or any other bells and whistles.

    I would then develop the absolute bare bones MPU code that would be needed to load a data file into an EPROM. No bells and whistles here, either, because I want this program to be as small as it can be. Just because my programmer will be able to display values in HEX on a display or be able to read data from the EPROM does not mean that those features have to be supported in the first version of the code. Why? Because I'm going to be loading each and every instruction of the first version into the EPROM manually!

    As soon as I have this program in the EPROM, I can then use the MPU-based bare bones programmer to load a larger program that has all of the rest of the code needed to run the rest of the features that the programmer supports.
     
    Last edited: Jan 7, 2014
  7. MrChips

    Moderator

    Oct 2, 2009
    12,429
    3,360
    That is the true description of what it means to "bootstrap" a computer.
     
Loading...