Intel 8085 microprocessor

t06afre

Joined May 11, 2009
5,934
How can I do that ?

Thanks !
If the ADC and LCD share a common 8 bit port. Then you want to access the ADC you pull the CS pin low and keep the E input low. Then you want to access the LCD you keep the CS pin high and then give a strobe signal on the LCD E pin. A strobe signal equal to taking the E pin high and then low again. I see you have a pin PC7 on 8255 free to use for the CS signal. It would be more easy if you quit being in panic mode, and then focus on your task. Solving one problem at the time. As a start draw a new schematic if you feel the common port solution is something you want to follow
 

Thread Starter

vincent19-mas

Joined Dec 27, 2012
83
If the ADC and LCD share a common 8 bit port. Then you want to access the ADC you pull the CS pin low and keep the E input low. Then you want to access the LCD you keep the CS pin high and then give a strobe signal on the LCD E pin. A strobe signal equal to taking the E pin high and then low again. I see you have a pin PC7 on 8255 free to use for the CS signal. It would be more easy if you quit being in panic mode, and then focus on your task. Solving one problem at the time. As a start draw a new schematic if you feel the common port solution is something you want to follow
Ohh, now my CS pins in grounded. Why do I need to insert it to one extra port else ?

I am now trying to interface it with 4 bits. Seriously need help here ><

Connection so far:
Now, my port A is output, portB is output and lower Port C output and upper port C is INPUT. So I used Port A for 8 data bit of LCD, 8 Ports in PORTB for ADC 8 bit output and PC0 as RS, PC1 WR(ADC),PC2 E(LCD), PC3 RD(ADC),PC4 INTR(ADC) and remaining PC5,6,7 are not used but they are in INPUT mode which I cant connect any output device to that particular ports ><
 

t06afre

Joined May 11, 2009
5,934
Well by using the setup I suggested you could keep your current LCD ruotines. Since you struggled somewhat with that. But of course it is your call:rolleyes:
 

t06afre

Joined May 11, 2009
5,934
It has been a while since I used the 8255. So I kind forgot how it works. Port A and B can only be output or input with the same IO function on all pins. Port C have different IO on the high and low nibble. Therfor you have to free up one IO pin on the lower part at Port C. This can be done by connecting the RD and WR like shown in figure 32 in this datasheet http://www.ti.com/lit/ds/symlink/adc0804-n.pdf Then you can use either Port A or B to other things
 

Thread Starter

vincent19-mas

Joined Dec 27, 2012
83
Well by using the setup I suggested you could keep your current LCD ruotines. Since you struggled somewhat with that. But of course it is your call:rolleyes:
I think it will be better to interface it in 4 bit mode rather than the shared method.

So, no one knows how to change the wr_cmd and we_char function ?

Hope I can get it solved soon

Thanks!
 

Thread Starter

vincent19-mas

Joined Dec 27, 2012
83
It has been a while since I used the 8255. So I kind forgot how it works. Port A and B can only be output or input with the same IO function on all pins. Port C have different IO on the high and low nibble. Therfor you have to free up one IO pin on the lower part at Port C. This can be done by connecting the RD and WR like shown in figure 32 in this datasheet http://www.ti.com/lit/ds/symlink/adc0804-n.pdf Then you can use either Port A or B to other things
Well, ya. It is better to get one of the lower PORTC free so that I might need to connect it to a buzzer for alarm system when temperature limit is reached. PortA and Port B are fully used by LCD 8 data bits and ADC output pins respectively.

Thanks !

So I thought to interface the LCD with 4 bits only so that I can have extra 4 ports at PORT A.

Thanks !
 

Thread Starter

vincent19-mas

Joined Dec 27, 2012
83
It has been a while since I used the 8255. So I kind forgot how it works. Port A and B can only be output or input with the same IO function on all pins. Port C have different IO on the high and low nibble. Therfor you have to free up one IO pin on the lower part at Port C. This can be done by connecting the RD and WR like shown in figure 32 in this datasheet http://www.ti.com/lit/ds/symlink/adc0804-n.pdf Then you can use either Port A or B to other things
Wow, they connect both the WR and RD pins together ? This is possible ? I thought the timing diagram for both of this pins is different ?

Thanks !
 

Thread Starter

vincent19-mas

Joined Dec 27, 2012
83
Initialization is the same. They all use the same controller.
What differs is the location of the 1 to 4 lines.
You mean for 16x2 LCD,
ROW 1 it is 0x80 0x81 0x82 0x83.......0x8F
ROw2 it is 0xC0 0xC1 0xC2..........0xCF ?

For 20x4 LCD,
Row1 0x80 0x81 0x82 0x83 through 0x93
Row2 0xCO 0xC1 0xC2 0xC3 through 0xD3
Row3 0x94 0x95 0x96 0x97 through 0xA7
Row4 0xD4 0xD5 0xD6 0xD7 through 0xE7

You mean this ?

However, by referring to this link : http://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller

N - 0 = 1/8 or 1/11 duty (1 line), 1 = 1/16 duty (2 lines)
Does that means the ROW of the LCD used or what ? Cause I dont see 4 lines here :(
 

MrChips

Joined Oct 2, 2009
30,821
I presume you have your LCD working.

The character buffer is one 80-char buffer.
Send 80 characters out A-Z,0-9,a-z etc and see which line they appear on.

What you have looks correct but I have to double check.
 

Thread Starter

vincent19-mas

Joined Dec 27, 2012
83
Any software to draw the block diagram/ circuit of 8255 and ADC, LM 35 ? most designing circuit software I have dont have the 8255 components.

Any ideas ?

Thanks !
 

absf

Joined Dec 29, 2010
1,968
You can try proteus. Only some of the ADC and DAC can be simulated. Most are for schematics drawing.

I have used the 8051 as a template to create the 8085 for drawing my SBC.

Allen
 

Attachments

Last edited:

ks1992

Joined May 16, 2013
1
guys. I am trying to build a schematic as well as a board for my 8085 project, i am running into a bit of difficulties, my project's aim is to use a LDR to run multi pattern lights using a 8085 microprocessor. How can i connect a 555 timer which helps the microprocessor read the frequency so that i can get multiple patterns.
any other ideas for this project are welcome. thanks.
 

Thread Starter

vincent19-mas

Joined Dec 27, 2012
83
You can try proteus. Only some of the ADC and DAC can be simulated. Most are for schematics drawing.

I have used the 8051 as a template to create the 8085 for drawing my SBC.

Allen
How do I calculate for this time delay to get 1s ?

Anyone can tell me ? Pretty confuse on this kind of calculation. Hope I will be clear later on :)
 

Attachments

absf

Joined Dec 29, 2010
1,968
I am not good in this type of calculation too. I'll give my best shot.

Rich (BB code):
	MVI	C,10
LOOP:	MVI	D,100	========] Z
LOOP5:	MVI	E,222	  --} Y ]
LOOP6:	DCR	E     --] X }   ]
	JNZ	LOOP6 --]   }	]
	DCR	D	    }	]
	JNZ	LOOP5	  --}	]
	DCR	C		]
	JNZ	LOOP	========]
	RET
	
	
	X=(4+10)*222-3 =3105 T_CYC  
	Y=(7+X+4+10)*100-3 =2174897 T_CYC
	Z=(7+Y+4+10)*10-3 =21749177 T_CYC
	
	TOTAL= 7+Z+10 =21749194 T_CYC
	
ASSUMING YOU'RE USING 4 MHZ CRYSTAL, THEN THE CLOCK IS 2 MHZ 
AND 1 TCYC = 500nS

SO TOTAL TIME DELAY IS = 21749194*0.5uS ~= 10.87 S
Not sure if it is correct. But you can use it as a reference.

Allen
 
Top