| Electronics > Projects, Designs, and Technical Stuff |
| MC68B50 TTL Serial case of a curious missing bit. |
| (1/2) > >> |
| theworldbuilder:
Hi all, In a homebrew computer I'm making I'm currently having this curious issue of a single bit consistently going missing over the USB to TTL serial connection between my PC and my single board computer. The expected start-up message should be: Cold [C] or Warm [W] start? The message I receive is as follows: /,$ /2 7!2- 34!24? The binary for the first message is: 01000011 01101111 01101100 01100100 00100000 01011011 01000011 01011101 00100000 01101111 01110010 00100000 01010111 01100001 01110010 01101101 00100000 01011011 01010111 01011101 00100000 01110011 01110100 01100001 01110010 01110100 00111111 The binary for the second is: 00101111 00101100 00100100 00100000 00101111 00110010 00100000 00110111 00100001 00110010 00101101 00100000 00110011 00110100 00100001 00110010 00110100 00111111 Comparing the first and second set of data from the last byte received backwards, you can see that from the second last byte the data is identical except for b6 (from right to left starting with b0). b6 is consistently low in the second set of data even though it is expected to be high for some bytes as seen in the first set of data. The MC68B50 is running at 7.3728MHz which is well above it's given spec but I've seen the likes of Grant Searle using it at these frequencies in his z80 computer: http://searle.hostei.com/grant/z80/SimpleZ80.html To further this, on rare occasions the the data will come trough correctly and the computer will function as desired. Any suggestions or ideas as to what is causing this issue? And even perhaps how to fix it? I've done a good bit of digging myself but haven't been able to find much about it online. |
| mikerj:
A dodgy connection between the ACIA and D6 on the data bus perhaps? You are playing with fire running a clock at almost 5 times the datasheet maximum though, this kind of thing could easily be caused by a timing violation within the IC logic. |
| ChristofferB:
okay, so first thing: make sure D6 isnt stuck. get a probe on there and check it actually transmits data. You'd be amazed how long a simple computer can get with a stuck bit. 2nd make sure it's decoupled VERY well. solder an 100 nf directly between the power legs on the chip. oh, and check that your clock has nice clean rises and falls. If that doesn't lead to anything interesting make a simple flip flop clock divider and put it between the main clock and your uart. If you have a slower divisable xtal, ideally an 1.8432mhz one, try that and adjust the prescaler in the uart to 4 times less than what it was. If this works you can just copy the main oscillator circuit for the cpu and have one with the 7.3728 mhz and one with the slower UART clock. Hope that helps! |
| ChristofferB:
Oh, and also: going beyond freq. spec, it can very well be that some versions, manufacturers or even batches will handle it fine, and some just can't. Either way having a 2nd oscillator is a small modification. |
| theworldbuilder:
--- Quote from: mikerj on June 18, 2019, 10:09:51 pm ---A dodgy connection between the ACIA and D6 on the data bus perhaps? You are playing with fire running a clock at almost 5 times the datasheet maximum though, this kind of thing could easily be caused by a timing violation within the IC logic. --- End quote --- --- Quote from: ChristofferB on June 18, 2019, 10:16:42 pm ---okay, so first thing: make sure D6 isnt stuck. get a probe on there and check it actually transmits data. You'd be amazed how long a simple computer can get with a stuck bit. 2nd make sure it's decoupled VERY well. solder an 100 nf directly between the power legs on the chip. oh, and check that your clock has nice clean rises and falls. If that doesn't lead to anything interesting make a simple flip flop clock divider and put it between the main clock and your uart. If you have a slower divisable xtal, ideally an 1.8432mhz one, try that and adjust the prescaler in the uart to 4 times less than what it was. If this works you can just copy the main oscillator circuit for the cpu and have one with the 7.3728 mhz and one with the slower UART clock. Hope that helps! --- End quote --- Thanks for the responses guys. I've done a bit of digging around the board, checking for a stuck bit, ensuring correct decoupling and making sure the clock is behaving itself. Unfortunately all checks out as okay here. I then simply reprogrammed the EEPROM and slowed the clock down and as expected the chip worked a-okay. I'm still unsure as to exactly what is causing the issue as I have tried it with multiple different MC68B50s I have on hand and they all present the same issue. I'm starting to think that perhaps it's related to my clock frequency. Perhaps the clock is running slightly too fast or slightly too slow? This would answer as to why in certain cases the connection is perfectly fine and I can use the computer without issue. Perhaps the crystal just happens to drift just into spec for the baud rate? |
| Navigation |
| Message Index |
| Next page |