RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » Mark IV Serial Port Troubleshooting (Need help with my Serial port)
Mark IV Serial Port Troubleshooting [message #279] Tue, 26 January 2016 22:43 Go to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Guys,
I have a Mark IV board that passes all tests up to but not including the first Serial port test. I heard on the Multicomp PCB forum topic that Dr. Acula has 50 MAX232 chips that are fakes. Well the Mark IV doesn't use the MAX232 chip, instead the MAX233CPP ship is used. All I get on the first serial port test is the output in putty looks like an incorrect BAUD rate. What details do you need to remotely troubleshoot this problem. My Crystal is 18.432MHZ. Is this crystal frequency the source of my problem. I will be ordering parts very soon as in a few days for the new Cyclone IV board I recently received and I would like to get all my parts orders into one order, Thanks in advance for any help in getting my Mark IV board fully functional. Take care my friends.


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #281 is a reply to message #279] Wed, 27 January 2016 07:30 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
Hi Kip,

Yes, the 18.432MHz crystal is correct (for the CPU clock).

Can you confirm that the testing you are doing is via the TEST0.BIN firmware? Assuming it is, are you setting your serial terminal to 9600 baud? I'm sure you are, but wanted to check.

I noticed you refer to your chip as MAX233CPP. John specified a MAX233A (which would be a MAX233ACPP including the packaging suffix). I was unable to determine the key differences of the A suffix, so have no idea if it is critical.

Thanks,

Wayne
Re: Mark IV Serial Port Troubleshooting [message #282 is a reply to message #281] Wed, 27 January 2016 13:13 Go to previous messageGo to next message
will is currently offline  will
Messages: 213
Registered: October 2015
Senior Member
Hello

The correct baud rate should be 9600bps. 8 bits data, no parity, 2 stop bits (although the more common 1 stop bit should also work).

18.432MHz will work perfectly for the main oscillator.

John's code will use the RTC to determine the frequency of the main oscillator -- it needs to know this frequency so it can program the correct divisor in the ASCI UART to generate 9600bps baud serial output. So this means your RTC has to be working correctly and the RTC crystal has to be correct.

Good luck!

Will
Re: Mark IV Serial Port Troubleshooting [message #284 is a reply to message #281] Wed, 27 January 2016 20:59 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Wayne,
This is the cheapest MAX233A chip Digikey has. For $10 and change I want to be sure this one is the correct chip before I order it. This is the url.
< https://www.digikey.com/product-detail/en/MAX233ACPP%2BG36/M AX233ACPP%2BG36-ND/1091242>
Would you please double check this for me and let me know? Thanks a bunch my friend.


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #285 is a reply to message #284] Wed, 27 January 2016 22:18 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
The part you reference looks right.

However, I finally tracked down a reference to the difference between the 233 and the 233A. Apparently, the only difference is the maximum baud rate. For the 233, it is 115K and for the 233A, is 230K. This would imply that the part you already have should be fine at the desired 9600 baud rate of the test.

--Wayne
Re: Mark IV Serial Port Troubleshooting [message #321 is a reply to message #279] Thu, 11 February 2016 07:00 Go to previous messageGo to next message
will is currently offline  will
Messages: 213
Registered: October 2015
Senior Member
Curious to know if you got this working?
Re: Mark IV Serial Port Troubleshooting [message #322 is a reply to message #321] Thu, 11 February 2016 23:03 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Will,
I have not got my Mark IV 2.0 SBC running yet. When I tested before, I got to step 4 where the serial port is tested, and garbage displayed in putty. Tohight, I tried my board with the test0 eeprom and D4 just sits on green so I read the docs for test0 and found that I need an sd card. Sd, SDHC or SDHX? During test0, does the SD card get written to? I have sd cards I'm using, but I can't find my blank 8GB sd cards at the moment. I need to find my blamk 8GB sd cards and try one. Can the RS-232 10-pin serial port run with just TX, RX and GND? I have a USB to TTL Serial cable with just VCC, GND, TX and RX wires. All my 10-pin to db9 flat cables from old PCs have male connectors on them and my USB to DB9 RS-232 cable also has a male connector. I know I have a Female to female DB9 gender changer because that is what I used before. I just cannot find that either. I guess I have a little housekeeping to do in my work area in the building out back. Smile I just found what I think is a blank SD Card so i used it. I ran my Mark IV Test0 eeprom just now and D$ stays green. No D3 yellow flashing. The flash chip should still have test0.bin in it, but I will reburn it to make sure. What else do I need to check?


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #323 is a reply to message #322] Thu, 11 February 2016 23:09 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Will,
Thanks for asking. I want to continue building my Mini-68K board, but I have got to understand this board better first and get it to pass all of test0.bin's test before I can even think to download the latest version of Fuzix and try it. It was stopping at step 4 with the serial test, now step one won't even go even though I have an 8GB sd card inserted and the 4 jumpers below I/O ADDR are off-on-on-on. Has something else gone bad? Help!


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #324 is a reply to message #323] Fri, 12 February 2016 04:18 Go to previous messageGo to next message
will is currently offline  will
Messages: 213
Registered: October 2015
Senior Member
I will dig out my Mark IV SBC later today and put together something to show how mine works. Then perhaps you can reproduce the same tests.
Re: Mark IV Serial Port Troubleshooting [message #325 is a reply to message #324] Fri, 12 February 2016 11:02 Go to previous messageGo to next message
will is currently offline  will
Messages: 213
Registered: October 2015
Senior Member
Hi Kip

I've dug out my Mark IV and made a short video for you demonstrating a known-working configuration:
https://www.youtube.com/watch?v=RQ2o6xgCyw4

Attached to this message please find "kip-una.rom". This 512KB file is a ROM image. Flash it to a 512KB ROM and load that into your Mark IV.

Configure the jumpers as shown in the video.

Get or make an appropriate RS232 data cable (you only need three wires - Ground, TX, RX).

Apply 5V power to the board. You should see the SD card activity LED flash for about five seconds, then output on the RS232 port at 9600bps, 8 bits data, no parity, 2 stop bits.

Good luck! Let me know how it goes.

The SHA1 checksum of "kip-una.rom" is 9dbecd7a2d7803d1acac1a7ffae23cdf37ffb64a.
  • Attachment: kip-una.rom
    (Size: 512.00KB, Downloaded 511 times)
Re: Mark IV Serial Port Troubleshooting [message #326 is a reply to message #325] Sat, 13 February 2016 02:46 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Will,
I checked my jumpers against your jumpers. Both of our boards are jumpered the same. I also have 512KB of static ram and 512KB of flash.
I burnt your Kip_una.rom file into an AM29F040B 512KB flash eeprom and powered up. The Yellow LED flashed 5 times 1 sec. apart then displays the follow info.
--------------------------
y=y=y=y=TMâ–’RRâ–’s$â–’â–’rRâ–’ Ҳ▒▒ Râ–’â–’â–’â–’2â–’sâ–’Iâ–’3yâ–’â–’â–’~â–’â–’â–’~â–’:>~â–’z6R~ڦ▒▒~~6*FFZFb~BF~z~â–’: >~zn&zFrjn~â–’JrNz22~>6Brj22B6â–’â–’~~" Z.^~eg3Z2â–’)â–’â–’2râ–’eg3Z2â–’%))֪▒▒~▒▒²~&j6 2ZBF~:F*6J6.~Bf~:*Jâ–’jvJ6 > :*F~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^3cky=y=VMâ–’â–’â–’3â–’$Rrâ– ’â–’~ > ]â–’â–’=y=^H$FHâ–’â–’â–’â–’â–’â–’$â–’â–’â–’S$â–’â–’ò“¥²â–’Ir â–’â–’ â–’2R▒Ҳ▒Râ–’~~~~â–’z.j~6jzn~~â–’BF~â–’&â–’&3â–’ â–’â–’~~~~â–’z.j~â–’JJBnnBâ–’~
----------------------------------
The pattern is repeatable. Do I have a bad MAX233CPP chip? If not, then what else could be wrong?


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #327 is a reply to message #326] Sat, 13 February 2016 04:29 Go to previous messageGo to next message
will is currently offline  will
Messages: 213
Registered: October 2015
Senior Member
Well, this is mostly good news. Your CPU, ROM, RAM, address decoding etc all appear to be working correctly.

My suspicions (in the order I would test them):
- Receiving terminal is not configured for 9600bps, or has a faulty reference clock: Try using different terminal hardware and software.
- Faulty 32.768KHz crystal: If you have access to a scope, probe it and check it is oscillating at the correct frequency?
- Faulty MAX233: Try swapping this out, OR connect a TTL-level receiver directly to the socket, you need GND plus pin 2 (T1IN).
- Faulty DS1302?

The only reason I suspect the DS1302 and RTC crystal is that these are used to calibrate the CPU oscillator frequency and to select the baud rate divisor to program into the UART.
Re: Mark IV Serial Port Troubleshooting [message #328 is a reply to message #327] Sat, 13 February 2016 10:01 Go to previous messageGo to next message
norwestrzh is currently offline  norwestrzh
Messages: 196
Registered: November 2015
Senior Member
Hi Will -

Great video!!! Good to have some things explained, and see how others bring up the mark4 and set jumpers.

I have the compact flash working on my mark4, but I'd like to work with the SD card -- maybe set up a file system on it. Also want to write some code to read the 1302. I've figured out that the RTC is on port 5Ch (I think that's right?), but still trying to figure out how to access the SD card. Is this documented anywhere? Maybe the best way to use the SD card is to use cpmtools to create a filesystem on it? But with what diskparms? So many questions ... so little time. *grin*

Roger
Re: Mark IV Serial Port Troubleshooting [message #329 is a reply to message #326] Sat, 13 February 2016 10:54 Go to previous messageGo to next message
Jonas is currently offline  Jonas
Messages: 77
Registered: October 2015
Member
I have no problems at all with the Mark IV/RomWBW 2.7.1 combo. With UNA I get nonsense characters on the screen. I have checked everything... well, almost! I cannot remember if the pattern is repeatable though. Is the crystal frequency (32.768 KHz) critical for UNA? I know that my crystal is not perfect. The clock is too fast. Wrong capacitance (12.5 pF) maybe? I know that you should use a 6 pF crystal. The crystals are sometimes sold unspecified.

I have noticed that laptops are not created equal. I have a lot of old laptops from a 133 MHz Pentium to a 1.7 GHz Pentium 4 with com-ports. I prefer the laptops at the slower end if I need a terminal for Mark IV, SBC V2 or Mini-68. The 1.7 GHz Pentium 4 is acceptable as a terminal but not reliable when I transfer large files. I have an USB-adapter somewhere...

-Jonas
Re: Mark IV Serial Port Troubleshooting [message #330 is a reply to message #279] Sat, 13 February 2016 12:55 Go to previous messageGo to next message
will is currently offline  will
Messages: 213
Registered: October 2015
Senior Member
Hi all

Jonas -- Interesting that you have a similar issue to Kip with your Mark IV. Yes the 32.768KHz frequency is reasonably critical. If it's oscillating at the wrong frequency then the RTC will be fast/slow and the CPU oscillator calibration and thus UART baud rate calculation will also fail. I suspect that RomWBW does the calculation at the time the ROM is assembled; UNA measures it at runtime.

Kip -- The finger of suspicion is pointing at your 32.768KHz crystal. Do you have a way to measure the frequency of yours (eg an oscilloscope or frequency counter)? I have a spare 6pF crystal here left over from building my own Mark IV and I would be most happy to post it to you to see if it fixes your problem.

Roger -- The IDE CF interface on the Mark IV is much faster than the SD card interface. The SD card interface itself is not hard to program, it uses the CSIO ("clocked serial input/output") peripheral in the Z180. The main issues are that the CSIO and the SD card use reverse bit ordering so you need to reverse the bits in each byte (annoying), and the protocol to initialise an SD card is quite complex. If you want some inspiration I suggest you look at John's SD card driver in UNA BIOS (assembler), or my SD card driver from FUZIX (mostly C):

https://github.com/willsowerbutts/FUZIX/blob/master/Kernel/p latform-n8vem-mark4/devsdspi.c
https://github.com/willsowerbutts/FUZIX/blob/master/Kernel/d ev/devsd.h
https://github.com/willsowerbutts/FUZIX/blob/master/Kernel/d ev/devsd.c
https://github.com/willsowerbutts/FUZIX/blob/master/Kernel/d ev/devsd_discard.c

It's split into a generic part (everything in the dev directory), and a Mark IV specific part (the platform-n8vem-mark4 directory).

If you just want an easy life use UNA BIOS :) It gives a very nice block-level abstraction to access both the CF and SD interfaces.

DS1302 is very easy to talk to. The data sheet explains it all. My DS1302 driver from FUZIX shows how to read out the current time:

https://github.com/willsowerbutts/FUZIX/blob/master/Kernel/d ev/ds1302.c
https://github.com/willsowerbutts/FUZIX/blob/master/Kernel/d ev/ds1302_discard.c
https://github.com/willsowerbutts/FUZIX/blob/master/Kernel/d ev/ds1302.h
https://github.com/willsowerbutts/FUZIX/blob/master/Kernel/p latform-n8vem-mark4/ds1302-mark4.s

Again it's split into a generic and a Mark IV specific part.

Will
Re: Mark IV Serial Port Troubleshooting [message #331 is a reply to message #330] Sat, 13 February 2016 13:32 Go to previous messageGo to next message
Jonas is currently offline  Jonas
Messages: 77
Registered: October 2015
Member
Thank you Will!

I really don't know the crystal's capacitance. I guess I picked one by chance and got a 12.5 pF. I will do some soldering tomorrow!
Hmm, I think I should use my oscilloscope. Could be interesting to know the deviation from 32.768kHz with wrong capacitance.

Jonas
Re: Mark IV Serial Port Troubleshooting [message #332 is a reply to message #331] Sat, 13 February 2016 16:35 Go to previous messageGo to next message
norwestrzh is currently offline  norwestrzh
Messages: 196
Registered: November 2015
Senior Member
Wow!!! Thanks Will. That code will give me something to think about.

I suspected that the SD interface would not be very fast. Bit-banging the SPI interface with a Z80/Z180 is *ahem* somewhat counterproductive. *grin*

You mentioned FUZIX -- can you say a little bit about the status of that project? I'd love to get it working on my mark4.

Roger

P.S. We need a mark4 users' convention!!!!!
Re: Mark IV Serial Port Troubleshooting [message #333 is a reply to message #332] Sat, 13 February 2016 17:53 Go to previous messageGo to next message
mscane is currently offline  mscane
Messages: 111
Registered: October 2015
Senior Member
The Z180 CSI port does all the bit banging for you. It is a bit like a UART. However, it transmits and receives data in the wrong bit order for the SD card.

That means that you have to bit swap every byte you transmit and receive which pretty much negates the benefits of using the CSI.

To do the bit swap there are two methods; using a lookup table which is faster but uses more RAM (approx 253 bytes) or successive bit shifts which is slower but more RAM efficient.

The alternative is to just bit bang the interface and you avoid the bit order problem. I haven't found much performance difference between a bit banged SPI and the CSI with bit shifting.

The N8 has jumpers to select using the CSI or bit banging. I think the Mark IV is hard wired to the CSI.

Compared to the Bus connected Compact flash on the Mark IV, the SD card performs more like a floppy. Still useful but not recommended as your main disk. The good thing with the SD card is most PCs have an SD card so it makes it easy to move files between the PC and the Mark IV.

Cheers!

Max

[Updated on: Sat, 13 February 2016 17:54]

Report message to a moderator

Re: Mark IV Serial Port Troubleshooting [message #334 is a reply to message #333] Sat, 13 February 2016 20:02 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Everyone,
Great responses one and all! There is some great information here. Since the MAX233 chip is the last chip before the serial port 10-pin plug itself, I decided to check out the socket with my oscilloscope. When I pulled the MAX233 chip out of the socket to prepare for the probes, guess what I found? A broke pin! Pin 1 is definitely broke. Now since I have to buy another chip, and the MAX233A is a whopping $10, are there less expensive pin for pin compatibles here in the USA?


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #335 is a reply to message #334] Sat, 13 February 2016 20:40 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Guys,
I am having serious trouble getting the Mark IV even to reset the cpu properly I think. I get different results. I found that the pin 1 of the MAX233 was bent instead of broke. I straighten it out and reinserted the chip, but that is the RTS pin anyway. Just to make sure everything else is working I put my TTL RS-232 leads on the processor side of the MAX233 chip, but I get nothing at all because I have not yet seen the 5 yellow LED flashes tonight at all. Sometimes I get a red LED shortly after the Green LED while other times I get 5 very fast flashes so I reset the board and the 5 fast flashes happen again. This has happened a lot last night and a little tonight. I think that is all the different results I've had so far.


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #336 is a reply to message #334] Sat, 13 February 2016 20:45 Go to previous messageGo to next message
Andrew B is currently offline  Andrew B
Messages: 467
Registered: October 2015
Location: Near Redmond, WA
Senior Member
Administrator
If you don't need the higher data rate of the MAX233A, you could go with the regular MAX233 @ $5.68 - http://www.digikey.com/product-detail/en/MAX233CPP%2BG36/MAX 233CPP%2BG36-ND/1091245
Re: Mark IV Serial Port Troubleshooting [message #337 is a reply to message #335] Sat, 13 February 2016 20:49 Go to previous messageGo to next message
mscane is currently offline  mscane
Messages: 111
Registered: October 2015
Senior Member
Hi Kip,

The first thing to check when you are experiencing erratic behavior is the power supply.

Make sure it can support the current demands of your board.

Also measure the supply voltage around the board and make sure it doesn't drop below 5V

Cheers!

Max
Re: Mark IV Serial Port Troubleshooting [message #338 is a reply to message #335] Sat, 13 February 2016 20:59 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Guys,
I have slightly different results. For a while, I was getting just the Green led and nothing else. Now I'm getting a green led first, then the yellow and red leds.


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #339 is a reply to message #338] Sat, 13 February 2016 21:03 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Guys,
Now just green led over and over. I press the reset button or power cycle the board with no difference between the two - just a green led.


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #340 is a reply to message #339] Sat, 13 February 2016 22:06 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
Hi Kip,

Well, your results are a little perplexing -- doesn't seem completely consistent. If you are at a point where you just get the green LED and nothing else happens, I would be inclined to return to using the TEST0 ROM. UNA generally assumes the board passes all TEST0 tests and the TEST0 ROM does it's best to make minimal assumptions about what is working. TEST0 also provides more granular reporting at startup to determine where failure is occurring.

Note that you do not need to have an SD card inserted for TEST0, you just need to have the SD card support circuitry complete. For initial testing, I would not insert an SD Card nor a CF Card.

Even if the MAX233 is not installed, you should get at least as far as seeing LED D3 flash 5 times (when using TEST0 ROM).

When using TEST0 ROM, if you only get a solid green LED D4, there is a very fundamental issue with the board.

I would be interested to see what happens at this point if you try the TEST0 ROM again.

-Wayne
Re: Mark IV Serial Port Troubleshooting [message #341 is a reply to message #340] Sun, 14 February 2016 05:34 Go to previous messageGo to next message
will is currently offline  will
Messages: 213
Registered: October 2015
Senior Member
I occasionally have a similar issue with my Mark IV -- random hang with green LED or random crash with red LED. I think in my case it's due to either the ROM or RAM not fitting perfectly in their sockets, probably because I've levered the ROM out numerous times and damaged the socket in the process. It seems to happen as the board heats up because once it's happened and I've fixed it, it won't recur until the board has been powered off for a while. Anyway the fix is just a mechanical one, I either press the memory chips firmly into their sockets or (quicker) pick up the board in both hands and flex it gently to seat all the chips properly.
Re: Mark IV Serial Port Troubleshooting [message #342 is a reply to message #341] Thu, 18 February 2016 03:02 Go to previous messageGo to next message
Jonas is currently offline  Jonas
Messages: 77
Registered: October 2015
Member
Hi all,

On 13 February Will wrote: Yes the 32.768KHz frequency is reasonably critical. If it's oscillating at the wrong frequency then the RTC will be fast/slow and the CPU oscillator calibration and thus UART baud rate calculation will also fail. I suspect that RomWBW does the calculation at the time the ROM is assembled; UNA measures it at runtime.

I checked the error with my previous, unspecified crystal (12.5pF?). The clock was about 45% too fast while running my Z180. The clock was reasonably correct while not running the board.

I changed crystal (the new one specified as 6 pF) and now the error at runtime is reduced to 6.6%. I have tried to reduce the error further with another DS1302. The clock is a bit slow while not running the board, but I can live with that. UNA is running like a dream!

-Jonas
Re: Mark IV Serial Port Troubleshooting [message #343 is a reply to message #342] Thu, 18 February 2016 03:05 Go to previous messageGo to next message
will is currently offline  will
Messages: 213
Registered: October 2015
Senior Member
Thank you for this data point!

Kip -- does sound like the 32.768KHz crystal is the source of the problem. Would you like me to post you a 6pF crystal?
Re: Mark IV Serial Port Troubleshooting [message #344 is a reply to message #343] Thu, 18 February 2016 08:08 Go to previous messageGo to next message
Jonas is currently offline  Jonas
Messages: 77
Registered: October 2015
Member
45% deviation is a lot even with wrong capacitance. Defect crystal? Excessive heat due to soldering? External circuit noise? Maybe the last one. The error is next to nothing when the board is not running.

Crystal considerations:
http://datasheets.maximintegrated.com/en/ds/DS1302.pdf
http://pdfserv.maximintegrated.com/en/an/AN58.pdf

-Jonas
Re: Mark IV Serial Port Troubleshooting [message #345 is a reply to message #344] Thu, 18 February 2016 11:12 Go to previous messageGo to next message
norwestrzh is currently offline  norwestrzh
Messages: 196
Registered: November 2015
Senior Member
These "tuning fork" crystals are, from what I hear, apparently very delicate. It seems that improper handling, in any number of ways, can damage them.

Roger
Re: Mark IV Serial Port Troubleshooting [message #346 is a reply to message #343] Sat, 20 February 2016 03:38 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Will,
I would very much like to take you up on your offer to use your 32.768KHZ crystal. I do not have a frequency meter yet so I can not have any way of getting a reading of the frequency my RTC crystal on my Mark IV. I have a feeling that the capacitance of my 32.768KHZ cryatal may be off as well. Thank you my friend. I appreciate it very much.


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #347 is a reply to message #340] Sat, 20 February 2016 03:47 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Wayne,
I'll program the TEST0.bin file again into my 512KB flash chip and see how far I get and I'll let you guys know the results of the tests. The first time I ran the TEST0.bin eeprom, I got to step 4 if I remember correctly and the serial output test to Putty was garbled. I never got the correct display so I could not complete the rest of the tests. I'll try again as soon as I get the crystal from Will. Thank you all for your help thus far. I really appreciate it.


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #348 is a reply to message #347] Sat, 20 February 2016 08:01 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
Yes, I think this will help narrow things down. At a minimum, it takes the 32.768MHz RTC crystal out of the mix of possible issues. If you are getting garbled serial port output from TEST0, it is not related to the RTC crystal.

-Wayne

computerdoc wrote on Sat, 20 February 2016 03:47
Hi Wayne,
I'll program the TEST0.bin file again into my 512KB flash chip and see how far I get and I'll let you guys know the results of the tests. The first time I ran the TEST0.bin eeprom, I got to step 4 if I remember correctly and the serial output test to Putty was garbled. I never got the correct display so I could not complete the rest of the tests. I'll try again as soon as I get the crystal from Will. Thank you all for your help thus far. I really appreciate it.

Re: Mark IV Serial Port Troubleshooting [message #352 is a reply to message #348] Mon, 22 February 2016 06:16 Go to previous messageGo to next message
will is currently offline  will
Messages: 213
Registered: October 2015
Senior Member
Kip - crystal went in the post this afternoon. Should be with you in about a week, I am told.

I have looked again at the code for TEST0. It does appear to be independent of the RTC crystal frequency. It expects an 18.432MHz crystal. I/O jumpers should be set to 0x40 ie as shown in my video.

I think we can probably make progress before you receive the new crystal -- What happens now when you run TEST0?

... from YCRT0.S:

;
;  Table of Z180 registes to be set up VERY early
;
;  entries consist of
;       .DB     reg, value
;
Ytab::
        .db     icr, Z180_IO_BASE       ; must be first !!!
        .db     rcr, 0x7F               ; turn off Refresh
        .db     cbr, 0xF0               ; actually done at RST 0 reset vector
        .db     cmr, 0x00               ; Clock Multiplier; xtal*1 selected
        .db     ccr, 0x00               ; Cpu control; xtal/2 selected
        .db     cbar, 0x80              ; Common 0 at 0x0000 (can't change), 
                                        ; Bank at 0x0000, Common 1 at 0x8000
        .db     dev_xmem, 0x00          ; use ROM and on-bord RAM
;       .db     bbr, 0x00               ; done by reset, or by 'chain'

; some SIO and DMA setup
        .db     asext0, 0x00            ; ASCI extension control register 0
        .db     asext1, 0x00            ; ASCI extension control register 1
        .db     cntla0, 0x65            ; 8bits, noPar, 2stop
        .db     cntla1, 0x05            ; don't use TEND0, 8bits,noPar,2stop
        .db     cntlb0, 0x21            ; PS=1 (div 30) DR=0 (div 16) SSS=001
                                        ; PHI=18432k/2, /30, /16, SSS=/2**1 = 9600
Re: Mark IV Serial Port Troubleshooting [message #358 is a reply to message #352] Mon, 22 February 2016 10:32 Go to previous messageGo to next message
w9gb is currently offline  w9gb
Messages: 55
Registered: October 2015
Location: Chicago, IL
Member
Long ago, I pointed out to Andrew Lynch N8VEM that TWO industry standards existed for RS-232 headers (2x5) on PC boards.
I urged him, at the time, to 'set a standard approach' for the N8VEM PC board designers, to avoid confusion.

There are two common types of cable available to convert a IDC header (2x5) to the standard DE-9 RS-232 connector (9-pin, AT-style).
http://www.bodenzord.com/archives/117

The First standard, called DTK (Taiwan company making early IBM-PC add-in expansion cards in mid-1980s).
This is sometimes known as a "crossed" cable as pin 2 does not wire to pin 2, but pin 6, on the DE-9.
NOTE: "Intel" type cables changed from one layout to the other through time -- adding to confusion.
This approach permits usage of 3M IDC type ribbon cables for DE-9M termination.
You can search for "DB9M IDC10 DTK" to find them.

The Second standard, called "Everex", "AT", or "ASUS" type cable is a "straight" through cable.
PC Cables sells both standards.
http://www.pccables.com/DB9-M-TO-IDC-10-SERIAL-PORT-(AT-EVEREX).htm

Re: Mark IV Serial Port Troubleshooting [message #361 is a reply to message #358] Mon, 22 February 2016 11:23 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
Thanks for mentioning this Greg. This has indeed been a big point of confusion in the past and has not been recently discussed.

Since you didn't specifically mention it, I want to clarify that the N8VEM / RBC standard is the second one above which, as you say, is referred to as Everex, AT, or ASUS. I have also seen it referred to as Intel standard. These names are mostly derived from the pinouts used by the various motherboard manufacturers.

With all this said, I don't think this is likely to be Kip's problem if he is getting garbled output. The garbled output does not prove the pigtail is correct, but seems to imply that the problem is more likely to be a speed/protocol mismatch.

-Wayne
Re: Mark IV Serial Port Troubleshooting [message #362 is a reply to message #361] Tue, 23 February 2016 05:57 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Guys,
I have ran the TEST0.BIN file and found the same unreliable results. I thus began to wonder if the ZIF socket was not making good contact so I inserted the flash chip directly on the PCB socket. After bending a pin, test0 gave correct results. I got down to test 3 which tests for CTS which was not available since I'm using a 4 conductor USB to TTL RS-232 cable. I'm going to order a 6 conductor cable so I can continue with the test. I'll let you know when I have further results. Thanks to everyone's suggestions, comments and help. I appreciate it.


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #363 is a reply to message #362] Tue, 23 February 2016 08:08 Go to previous messageGo to next message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Guys,
I have found a suitable cable combination to connect to the laptop. Tests 1-3 work great. Test 4 displays thusly.
--------------------------------------------Output begins------------------------------------------------------ ------
â–’â–’â–’â–’jb^Fsâ–’â–’â–’â–’sfLâ–’=â–’â–’â–’â–’iâ–’sâ–’Iâ–’ #Mooy=Kâ–’â–’â–’â–’%â–’â–’rҳ▒֮^j~:*ZrR~v6â–’D$3~V*J >2> â–’â–’â–’sâ–’Iâ–’sҲ▒sL4y=sâ–’I▒Ӥ▒Iâ–’â–’â–’$3â–’~V*J > 2~â–’â–’#sâ–’Iâ–’sÒ²CsL4y=â–’sâ–’I▒Ӥ▒Iâ–’â–’$dâ–’3~V*N$ â–’2â–’â–’â–’sâ–’Iâ–’sҲ▒s2Sâ–’~~~â–’^j~:*ZrR~v6â–’$3ȳRâ– ’â–’$â–’ > â–’â–’â–’sâ–’Iâ–’sÒ²sbFâ–’â–’~~~~â–’^j~:*ZrR~v6â–’D$3ȳRâ–’â –’$â–’&j6~.^j~Nz~nâ–’L4y=â–’â–’â–’â–’sâ–’I▒Ӥ▒Iâ–’â– ’â–’ " â–’3ȳRâ–’â–’$â–’â–’#sâ–’Iâ–’sÒ²~nâ–’bFâ–’â–’~~~~~~â–’^j~:*Z rR~v6B " F~fâ–’â–’Râ–’â–’$â–’2â–’â–’â–’sâ–’Iâ–’sÒ²s2Sâ–’~~~~~~~â–’^j~ :*ZrR~v6B " â–’3â–’~V*â–’$â–’&j6~.^j~Nzâ–’s2Sâ–’~~~~~~~~â–’^j~:*^rR~ v6â–’ < 3â–’Râ–’â–’$â–’â–’#sâ–’Iâ–’sÒ²~nâ–’2Sâ–’~~~~~~~~~â–’^j~:*Z~r ~v6B " â–’3~V*â–’$â–’2â–’â–’â–’sâ–’Iâ–’sҲ▒s2â–’â–’~~~~~~~~~~â–’^ j~:*ZrR~v6HD$3â–’Râ–’â–’$â–’2â–’â–’â–’sâ–’Iâ–’sâ–’s2Sâ–’~~~~ ~~~~~~~â–’^j~:*ZrR~v6â–’D$3â–’~V*J >2~â–’" M#sâ–’Iâ–’sÒ²~nâ–’2Sâ–’~~~~~~~~~~~~â–’^j~:*KNNâ–’â–’â–’dâ–’3 â–’â–’Râ–’â–’$â–’â–’M#sâ–’Iâ–’sÒ²~nâ–’2Sâ–’~~~~~~~~~~~~~â–’^ j~:*ZrR~v6B "F~f▒ȳRâ–’â–’$â–’"M#sâ–’Iâ–’sÒ²~nâ–’bFâ–’â–’~~~~~~~~~~~~~~â–’^j~:*ZrR~v6B " F~f▒ȳRâ–’$â–’2â–’â–’â–’sâ–’Iâ–’sҲ▒s2Sâ–’~~~~~~~~~~~~~~ ~â–’^j~:*Iâ–’â–’$â–’3~V*â–’$â–’2â–’â–’sâ–’Iâ–’sÒ²~nâ–’2â–’â– ’~~~~~~~~~~~~~~~~â–’^j~:*ZrR~v6â–’|$3ȳRâ–’â–’$â–’&n6~.^ j~Nzâ–’sâ–’4y=â–’â–’â–’â–’â–’â–’â–’â–’â–’â–’â–’â–’â–’â–’â–’â –’sâ–’I▒Ӥ▒Iâ–’â–’$F~fB~V*J >2~â–’â–’â–’sâ–’Iâ–’sÒ²~nâ–’> SÖ®j2.â–’fâ–’â–’â–’$â–’râ–’â–’â–’â–’Sâ–’3rÒ’â–’Iâ–’â–’Mâ–’=â –’â–’â–’sâ–’I▒▒Ҳ▒▒▒ â–’~V*J>j62~^â–’:>Z~z6j~2n.~.B~>>~JJ~^â–’&&â–’> â–’2~â–’â–’Mâ–’=y=â–’â–’â–’â–’fâ–’â–’â–’$â–’râ–’â–’â–’â–’â–’ 3rÒ’â–’Iâ–’â–’Mâ–’=â–’â–’â–’sâ–’Iâ–’â–’d$Râ–’$$â–’â–’Ó’â–’sR 2â–’râ–’fâ–’â–’â–’â–’ >~zn&zFrjn~â–’JrNz2>~> 6Brj2FH#y=y=â–’â–’â–’â–’fâ–’â–’â–’$â–’râ–’â–’â–’â–’â–’â–’3rÒ ’â–’IMâ–’=â–’â–’â–’sâ–’Iâ–’â–’â–’â–’â–’Irâ–’â–’$MNâ–’I2â–’Ó’ â–’â–’d$&ZnZâ–’â–’sâ–’Iâ–’â–’â–’â–’â–’I2rRâ–’â–’Ö®j2.~.~ ~ > z22jn~~~^B*â–’â–’2â–’â–’râ–’sâ–’IIâ–’Mâ–’=▒▒󓥲▒Irâ–’ â–’â–’â–’â–’râ–’â–’& >>~vz*nN~"Z.^~zF~:F.26~â–’^â–’<â–’rrâ–’r$â–’â–’â–’~~~~~~^F6:&~â–’^â–’ <â–’S
~.>>~vz*nN~.F&>~â–’^2r~

~6.>> ~vz*nZâ–’â–’â–’Ö®j2.~*~â–’jv²▒▒Sâ–’â–’sâ–’â–’â–’dLâ–’=â –’yҲ▒▒râ–’$â–’Sâ–’â–’Rrâ–’Ó’â–’s▒Ȥrâ–’~jFn~.j2.~ "Z.^~â–’â–’â–’â–’â–’â–’â–’â–’
----------------------------------------Output Ends---------------------------------------------------
This is repeatable.



Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Re: Mark IV Serial Port Troubleshooting [message #365 is a reply to message #363] Tue, 23 February 2016 21:10 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
Hi Kip,

Sure looks like a simple baud rate mismatch. Good news that you now have a consistently repeatable result.

What are you using on the laptop for the terminal? I assume you are pretty sure it is setup for 9600 baud and 8 data bits, no stop bits.

-Wayne
Re: Mark IV Serial Port Troubleshooting [message #418 is a reply to message #365] Mon, 07 March 2016 22:47 Go to previous messageGo to previous message
computerdoc is currently offline  computerdoc
Messages: 130
Registered: October 2015
Senior Member

Hi Guys,
I received the 32.768KHZ Crystal from Will and installed it on my Mark IV. I needed to order some parts for another project so I ordered a MAX233A chip and replaced the MAX233 chip though someone said it may not be necessary since I was using 9600 baud on the serial port in the tests. I am still getting the garbled results as in previous tests. What else can I do since the MAX233A chip connects directly to the Z8S180 CPU chip?


Kip Koon
computerdoc at sc dot rr dot com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
Previous Topic: Arc/Unarc For Dos/Windows 7
Next Topic: ISA 8-bit Backplane


Current Time: Fri Dec 12 01:41:28 PST 2025

Total time taken to generate the page: 0.03529 seconds