EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: ChristofferB on November 19, 2015, 12:17:47 am

Title: What on earth happened: 8052 serial
Post by: ChristofferB on November 19, 2015, 12:17:47 am
Hello all!
I'm going to have to call on your minds again! Just got a 1988 8052 BASIC development board. quite nice, looks almost brand new. Had serial and some 8255s for I/O.

Now, To do a quick "hello world" and see if it was any good (sold as is), I removed the 1488 and 1489 RS232 drivers, found the serial RX/TX and  ground point, and hooked it up to an arduino via the 1488/89 sockets.

After fiddling with the baud rate, It was fairly high: 115200bd - it worked great. Got the prompt and could write commands to it etc.

Then after ca. 10 mins, it just turned to writing gibberish back at me. As if it was at a wrong baud rate.
It still returns strings when you send characters, but only random characters.

I tried to switch PSU's, tried with a laptop instead of std. pc. Could be a noise /skew thing, since it's really just long loose jumper leads to an arduino, but it just seems drastical to stop so sudden. Did the 8052 die/get damaged? Would it still function enough to send serial gibberish?`

I hope someone has some experience with similar problems.

Thanks in advance,

Christoffer
Title: Re: What on earth happened: 8052 serial
Post by: free_electron on November 19, 2015, 02:12:18 am
the 8052 ah basic autodetects baudrate at powerup.
to do this , the FIRST character received after power up must be <SPACE>

. so most likely what happened is that you cycled power , the 8052 went into autodetect and you sent something else than a space character. this throws off the baud detection routine.

The autobaud detector works by measuring the time between edges of bits. they check the edge of the start bit and the first bit that is high in the space character ( space is ascii 32 so bits 7 6 5 are low , but 4 is the first one that is logic high. by measuring this time they figure out the baudrate.
Title: Re: What on earth happened: 8052 serial
Post by: ChristofferB on November 19, 2015, 11:48:20 am
Thank you! That's the info I was missing!
Guess I should have read the 8052 BASIC datasheet..
--Christoffer
Title: Re: What on earth happened: 8052 serial
Post by: free_electron on November 19, 2015, 03:05:36 pm
you're welcome.

i loved that cpu. if you type <CTRL>W <CTRL>C you will get the easter-egg
i once had the rom loaded into an optimised 8052 (oregano systems) i instantiated in an FPGA.
clock the thing at 150MHz on a 4 cycle machine and watch it fly !