Intel 8085 project, a few questions.

Thread Starter

BlackCow

Joined May 11, 2009
65
So when I first apply power to an 8085, at which address does it start?

I was thinking it would be at 0x0000 but I'm not so sure, the datasheet doesn't seem to tell me.
 

Thread Starter

BlackCow

Joined May 11, 2009
65
Thank you!

One thing from the link you posted,

"the logical way to split the physical address space is RAM in one end and ROM in the other, with I/O in between."

I was actually planning to put my I/O at the very end. This is what I was planning to build a mem/IO decoder circuit for,


ROM: 0x0000 - 0x7FFF (32 k)
RAM: 0x8000 - 0xEFFF (28 k)
IO: 0xF000 - 0xF003 (addr. A0 - A1)
UART: 0xF008 - 0xF00F (addr. A0 - A2)


I am using an 8255 for IO and a 16C550 for UART. Would it make more sense to put IO and UART in-between?

Also this is my first microcomputer project of this type, is there anything you guys recommend I do differently?
 

t06afre

Joined May 11, 2009
5,934
Post your schematic. So we can take a look. This reminds of the good old days with Z80. That was one cool 8 bit CPU.
 

Thread Starter

BlackCow

Joined May 11, 2009
65
I finished my schematic and even wrote a little bit of the OS. All the code does so far is initialize the 16C550 UART and print a null terminated string to a terminal.

I haven't actually built it yet, but I have all the parts to it, just have to sit down and wire all those data and address lines up. I'm building onto a decent size breadboard (I have LOTS of hookup wire).

I'm going to start with wiring ROM and the UART to see if I can get a hello world out before building the rest in. I have plans to add more in the future, I was even thinking about someday writing a floppy controller for loading programs into RAM.

I have attached the schematic for those interested.

Here's to hacking like its 1979. Wish me luck on the build!
 

Attachments

Thread Starter

BlackCow

Joined May 11, 2009
65
So I got my PROM and UART wired up, I have a PROM burner ready to go, I have a quick program to output hello world written...

Now all I need to do is assemble it to a .bin file and burn it to the chip, the only problem is it can't find ANY assemblers!!! There are tons of simulators out there but none of them will assemble for me, what good is that!

Can someone help me, this is driving me nuts!

Update: Ah screw it, I just assembled it by hand with a hex editor :)

I would really like to have an assembler though!
 
Last edited:

Thread Starter

BlackCow

Joined May 11, 2009
65
Perhaps some one can help me... nothing works :-(

I'm pretty sure I have my ROM and UART wired up correctly but I can't get it to do anything.

I thought it was my code but when I logic probe the circuit I notice that all the data and address lines are tri-stated, and the latched address [0-7] is all logic zero.

Hitting the reset button does nothing.

I have all the interrupts grounded, should it not start running at 0x0000?

:confused:
 

nsaspook

Joined Aug 27, 2009
7,487
Perhaps some one can help me... nothing works :-(

I'm pretty sure I have my ROM and UART wired up correctly but I can't get it to do anything.

I thought it was my code but when I logic probe the circuit I notice that all the data and address lines are tri-stated, and the latched address [0-7] is all logic zero.

Hitting the reset button does nothing.

I have all the interrupts grounded, should it not start running at 0x0000?

:confused:
Do you have a signal at the clk pin? Is the reset pin at 5vdc while running? I have a old 8085 based adaptec controller board. (scsi to smd interface) but it needs a little help (shorted 7805) to get going. From a quick look at circuit traces, the reset circuit uses a tl7705 with a 4.7K resistor from vcc to pin 5 (tl7705) tied to pin 36 (8085) for the reset signal generation.

http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBkQFjAA&url=http://focus.ti.com/lit/an/slvae04/slvae04.pdf&ei=gOVeTOzABYTSsAOpt7zGDg&usg=AFQjCNGGEpTQLVrEl8YlGZLam6ABOaoJqQ&sig2=M3rSW7xIMzqA-lI8YvQKww

RESET IN’:
This pin resets the program counter to 0 and resets interrupt enable and HLDA flip-flops. The CPU is held in reset condition until this pin is high. However the flags and registers won’t get affected except for instruction register.

When you get it running a copy of this book would be a good addition if you don't already have it.

8080/8085 Software Design:


http://www.amazon.com/gp/offer-listing/0672215411/ref=dp_olp_0?ie=UTF8&redirect=true&condition=all



 
Last edited:

RiJoRI

Joined Aug 15, 2007
536
It's been a LONG time since I worked with an 8085!

(1) Remove all non-essential chips: ICs 4-7. Of course your code will need to be very simple. We used to do a quick check using the SOD line: Set it, pause, reset it, pause, repeat.
(2) Make sure all your lines are correct, including no shorts between signals. (Don't ask me why I know this! :))
(3) Double check the levels of the interrupt lines.
(4) Bouncing of the reset switch may be causing problems.
(5) Make sure the Xtal inputs have signals, and the clock out signal is there.
(6) Check the ALE, and RD and WR lines.
(7) S0 & S1 should be active.

HTH,
--Rich
 

Thread Starter

BlackCow

Joined May 11, 2009
65
Thanks nsaspook, I think that may be the issue. I seemed to have missed that part in the datasheet!

"Upon power-up, RESET IN must remain low for at least 10 ms after minimum Vcc has been reached. For proper reset operation after the power-up duration, RESET IN should be kept low a minimum of three clock periods."

I guess I need a 10 ms reset delay for when I first power on and further reset the CPU or else it will not start at 0000h. Also in my circuit I have a pull down resistor and Reset In is active low so it is constantly in a reset state (which would explain the tri-stating).

I'll let you know how it goes, thank you so much for your help!
 

Thread Starter

BlackCow

Joined May 11, 2009
65
Ok so I've made some progress, after fixing the reset circuit and a few pins that needed to be grounded (do'h) I've got a looping program that blinks the SOD pin on and off.

Now I wrote a program to output data on my UART and it works... almost.

It is supposed to output a null terminated string that is 38 characters long and then halt.

For some reason it only outputs 17 of those characters and then goes into a halt state. I don't think its my software because when I null terminate the string before 17 characters it prints fine... it just seems to die.

I kind of suspect that its the reset circuit still because sometimes it prints a few less characters if I tap the reset button fast and don't hold it down. But I followed what the data sheet asked for.

I've attached the latest schematic. Any ideas what could be going on?
 

Attachments

tom66

Joined May 9, 2009
2,595
Make a test program which sets the LED on followed maybe 1 ms afterwards by an off state then goes into an infinite loop. If it's your program, the code will run fine; if it's your reset circuit, the LED will be blinking.
 

Thread Starter

BlackCow

Joined May 11, 2009
65
Make a test program which sets the LED on followed maybe 1 ms afterwards by an off state then goes into an infinite loop. If it's your program, the code will run fine; if it's your reset circuit, the LED will be blinking.
I'm not sure what that would accomplish... I already have the SOD pin going on and off (although with no delay) and that runs in an infinite loop.

But I just can't possibly see how it could be my software if it prints the first portion out and has no reason to stop going :-/
 

tom66

Joined May 9, 2009
2,595
The idea I posted would tell you if the chip is resetting or if it is your software. My bet is on software, but this will confirm it.
 

nsaspook

Joined Aug 27, 2009
7,487
Ok so I've made some progress, after fixing the reset circuit and a few pins that needed to be grounded (do'h) I've got a looping program that blinks the SOD pin on and off.

Now I wrote a program to output data on my UART and it works... almost.

It is supposed to output a null terminated string that is 38 characters long and then halt.

For some reason it only outputs 17 of those characters and then goes into a halt state. I don't think its my software because when I null terminate the string before 17 characters it prints fine... it just seems to die.

I kind of suspect that its the reset circuit still because sometimes it prints a few less characters if I tap the reset button fast and don't hold it down. But I followed what the data sheet asked for.

I've attached the latest schematic. Any ideas what could be going on?
Seems a software bug to me stopping at 17 and not some random number every time but we need the program listing to be sure.
 
Last edited:

Thread Starter

BlackCow

Joined May 11, 2009
65
Seems a software bug to me stopping at 17 and not some random number every time but we need the program listing to be sure.
Ah yes I think I figured it out.

I think its because it keeps writing to the UART's buffer faster than it can send its data out so I need to make sure it waits for the buffer to have room before it sends out more data.
 

nsaspook

Joined Aug 27, 2009
7,487
Ah yes I think I figured it out.

I think its because it keeps writing to the UART's buffer faster than it can send its data out so I need to make sure it waits for the buffer to have room before it sends out more data.
It looks like you need add logic for the C/D pin on the usart to read status for hardware polling.
 

Thread Starter

BlackCow

Joined May 11, 2009
65
Yay I got it working :)

Looks like I'm eating my words, it was a software issue. I just had to write a few instructions to make sure the buffer had room to store the next character. Hopefully I won't have to bother you with any more posts XD

Thank you so much for all of your help and suggestions. I've attached a picture for anyone interested.
 

Attachments

Top