| Mark IV Serial Port Troubleshooting [message #279] |
Tue, 26 January 2016 22:43  |
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 #322 is a reply to message #321] |
Thu, 11 February 2016 23:03   |
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. 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 #333 is a reply to message #332] |
Sat, 13 February 2016 17:53   |
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 #340 is a reply to message #339] |
Sat, 13 February 2016 22:06   |
 |
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 #352 is a reply to message #348] |
Mon, 22 February 2016 06:16   |
 |
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   |
 |
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   |
 |
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
|
|
|
|
|
|
|
|
|
|
|
|