Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/06/02 10:25
Read: times


 
#25366 - Atmel 2051 wired behaviour
Hello girls of 8052,
some month ago I wrote sw for my Atmel 89C20/4051 programmer based on an 80535. I thought I had made an mistake in the code. But now I have programmed a test sequence, it writes 256 Bytes. I tested it several times. All bytes became perfectly written. So I think it might be another error.

If I write:

org 20h
;code x
acall delay1
; code y
acall delay2
;code z



delay1
;code
ret
delay2
;code
ret

then the 2051 jmps to the first routine properly. But the second delay-routine becomes ignored! I tested this with an endless loop in the code of delay2. Instead of this code z gets worked immediately (!). Djnz commands make big troubles, too. It seems the 2051 sometimes assume zero for the loop condition, altough the content of the register to be decreased for is definitly not zero.

What might be the reason? I have several 2051processors, all have the same behaviour. My hardware is very poorly built, a 1uF reset-C, an old 10.820MHz CB-Radio Xtal (without the 22pF Caps) and a bunch of LEDs at Port 1+3 with a resistor array. That's it . I think the oscillator doesn't run on the 10.820MHz .If I touch the pins for Xtal1/2 the speed of the 2051 increases about three times. I think the osc runs on base freq., not on xtal's harmonics. But I think that's not the real reason for the problem. Does the 2051 must have a initialisation routine or something?


Many thanks in advance
Joachim von Briel, Germany


List of 4 messages in thread
TopicAuthorDate
Atmel 2051 wired behaviour            01/01/70 00:00      
RE: Atmel 2051 wired behaviour            01/01/70 00:00      
RE: Atmel 2051 wired behaviour            01/01/70 00:00      
RE: Atmel 2051 wired behaviour            01/01/70 00:00      

Back to Subject List