otacon14112
Experienced Member
Hey guys, it's been a couple years since I messed with my 8088 project. I took a break from it because I got frustrated with not being able to correct some problems. Anyway, I decided to start over from scratch a little over a week ago. It's gone good so far. I just added 4 dual-digit seven-segment LED digits for a total of 8. I'm using a 8255 PPI to use ports. When I apply power to the 8088 board, I have to hit the reset button once and then the program I'm posting runs. However, it takes a long time for the digits to gradually light up. Probably 3 minutes; I haven't timed it. Then, after a while, they start flickering, and then segments start getting dimmer and brighter randomly. Eventually all but one digit goes blank, and the one stays like that for a while, then the whole thing starts all over again.
I know there's a lot of information you guys need. I'm following the project from Robert Grossblatt's "The 8088 Project Book". I use a 138 to control which digit is accessed, and a 6116 2KB ROM for the character map. The digits display the characters correctly, 1-8. I replaced the 138 and the ROM chip, and it didn't make any difference. Before I added the 138, char ROM, and seven-segment LEDs, I had 8 LEDs connected to the 8 bits on port B of the 8255. They illuminated and displayed the correct binary combinations every time. I didn't have to wait for them to light up, but once in a while, they would change and display random combinations. I checked the voltage at various points around the board, and they're all anywhere between 4.69-4.78 volts. My power supply reads 5.0 volts.
Before I added the 138 BCD decoder, and the 2KB 6116 char ROM, and the 4 dual-digit displays, I tested the voltage across one of the basic LEDs. it was around .785, and it always fluctuated like it did when I was measuring the voltage around the board by + - .01 V approx.
I've checked the connections on everything, being paranoid that a wire is connected to a wrong pin, but every time I check everything over, all the connections are correct.
I have the complete data for the clock generator circuit, which I soldered onto a prototype board. I wanted to make sure there wasn't a capacitance problem near the clock generator, so I didn't want it in a breadboard. I wanted it to be as good as possible. Using my oscilloscope, here is the data for the clock pulses:
Crystal: 14.31818 MHz
CLK rate: 5 MHz
Period: 200 ns @ 10 zoom, 225 ns @ 1 zoom
Low period @ 1.5V: 122 ns
Low V: -.6V
High V: 5.39
Low-to-high 1.5V to 3.9V: 11 ns @ 10 zoom
High period @ 1.5V: 76 ns @ 10 zoom
High-to-low 3.9V to 1.5V: 7 ns
The max transition period is 10 ns, according to intel. I hope that extra nanosecond isn't messing things up.
I'll be posting pictures of schematics and diagrams shortly. I have to find my login information for the image hosting website I used last time. Ok I guess the schematics were already uploaded. Here's the link:
https://www.flickr.com/photos/9114793@N03/sets/72157634881520510/
But I wondered if anybody knows any possible electrical reasons why it would take the digits a long time to light up, and then flicker and go berserk.
It's set up so that the lower 5 bits are the character to be displayed, and the higher 3 bits are which display to light up. For example, 000 lights up the first seven-segment digit, and 111 lights up the eighth seven-segment digit. The lower 4 bits are standard hex: xxxX1010 will display an "A". If bit 5 is a 1, it provides additional character segment patterns (for a total combination of 32) if the reader of the book wanted to program any additional ones in the char ROM. Only a decimal point, dash, and underscore are extra characters, so far.
Here is my code so it can be scrutinized and analyzed for any potential logical errors:
I've studied the NASM manual, and I have like 5 different books about 8088-based systems and its assembly language. One of the books, likely a former university textbook (it has the typical "used" sticker commonly seen in college textbook stores on the binding - I got it from Amazon) doesn't even talk about setting or messing with SS or SP, saying it's the job of DOS, or the OS to do it, not the individual, but it has very good information about the instruction set otherwise. I've written the best code I can come up with, but I am still leaving open the possibility of a logical error on my part.
I have run out of ideas about how to test possible problems. I've checked and done everything I can think of, but I'm no computer engineer, just a hobbyist trying to see how far I can go lol.
So if anyone can help me figure out what's wrong, I'd appreciate it very much. Thanks a lot guys.
I know there's a lot of information you guys need. I'm following the project from Robert Grossblatt's "The 8088 Project Book". I use a 138 to control which digit is accessed, and a 6116 2KB ROM for the character map. The digits display the characters correctly, 1-8. I replaced the 138 and the ROM chip, and it didn't make any difference. Before I added the 138, char ROM, and seven-segment LEDs, I had 8 LEDs connected to the 8 bits on port B of the 8255. They illuminated and displayed the correct binary combinations every time. I didn't have to wait for them to light up, but once in a while, they would change and display random combinations. I checked the voltage at various points around the board, and they're all anywhere between 4.69-4.78 volts. My power supply reads 5.0 volts.
Before I added the 138 BCD decoder, and the 2KB 6116 char ROM, and the 4 dual-digit displays, I tested the voltage across one of the basic LEDs. it was around .785, and it always fluctuated like it did when I was measuring the voltage around the board by + - .01 V approx.
I've checked the connections on everything, being paranoid that a wire is connected to a wrong pin, but every time I check everything over, all the connections are correct.
I have the complete data for the clock generator circuit, which I soldered onto a prototype board. I wanted to make sure there wasn't a capacitance problem near the clock generator, so I didn't want it in a breadboard. I wanted it to be as good as possible. Using my oscilloscope, here is the data for the clock pulses:
Crystal: 14.31818 MHz
CLK rate: 5 MHz
Period: 200 ns @ 10 zoom, 225 ns @ 1 zoom
Low period @ 1.5V: 122 ns
Low V: -.6V
High V: 5.39
Low-to-high 1.5V to 3.9V: 11 ns @ 10 zoom
High period @ 1.5V: 76 ns @ 10 zoom
High-to-low 3.9V to 1.5V: 7 ns
The max transition period is 10 ns, according to intel. I hope that extra nanosecond isn't messing things up.
I'll be posting pictures of schematics and diagrams shortly. I have to find my login information for the image hosting website I used last time. Ok I guess the schematics were already uploaded. Here's the link:
https://www.flickr.com/photos/9114793@N03/sets/72157634881520510/
But I wondered if anybody knows any possible electrical reasons why it would take the digits a long time to light up, and then flicker and go berserk.
It's set up so that the lower 5 bits are the character to be displayed, and the higher 3 bits are which display to light up. For example, 000 lights up the first seven-segment digit, and 111 lights up the eighth seven-segment digit. The lower 4 bits are standard hex: xxxX1010 will display an "A". If bit 5 is a 1, it provides additional character segment patterns (for a total combination of 32) if the reader of the book wanted to program any additional ones in the char ROM. Only a decimal point, dash, and underscore are extra characters, so far.
Here is my code so it can be scrutinized and analyzed for any potential logical errors:
Code:
1 ; ************************************************
2 ; * *
3 ; * CREATED JAN. 23, 2015 *
4 ; * *
5 ; * PURPOSE: TO CAUSE 8 8-SEGMENT LEDS TO SHOW *
6 ; * HEX VALUES *
7 ; * *
8 ; ************************************************
9 ;
10 ;*****************************************************************************
11
12 USE16
13 section .data
14 ROM_SIZE equ 2048 ; size of ROM
15
16 section .text
17 Startup:
18 00000000 B80004 mov ax,0x0400 ; Initialize the stack so that it
19 00000003 8ED0 mov ss,ax ; occupies the last 1KB of memory
20 00000005 BC0008 mov sp,0x0800 ; in the 2KB 6116. This gives me
21 ; the first 1KB for misc data.
22 00000008 B880FF mov ax,0xFF80
23 0000000B 8EC8 mov cs,ax ; Set up the code segment to FF80
24 0000000D B090 mov al,0x90 ; This sets the 8255 to operate
25 ; in Mode 0 (basic input output)
26 ; with port 0 as an input and
27 0000000F E603 out 0x03,al ; ports 1 and 2 as outputs.
28
29 display:
30
31 ; Digit 0
32 00000011 B001 mov al,0x01 ; Prepare digit 0 to display "1"
33 00000013 E601 out 0x01,al ; Send data out to make it happen
34
35 ; Digit 1
36 00000015 B022 mov al,0x22 ; Prepare digit 1 to display "2"
37 00000017 E601 out 0x01,al ; Send data out to make it happen
38
39 ; Digit 2
40 00000019 B043 mov al,0x43 ; Prepare digit 2 to display "3"
41 0000001B E601 out 0x01,al ; Send data out to make it happen
42
43 ; Digit 3
44 0000001D B064 mov al,0x64 ; Prepare digit 3 to display "4"
45 0000001F E601 out 0x01,al ; Send data out to make it happen
46
47 ; Digit 4
48 00000021 B085 mov al,0x85 ; Prepare digit 4 to display "5"
49 00000023 E601 out 0x01,al ; Send data out to make it happen
50
51 ; Digit 5
52 00000025 B0A6 mov al,0xA6 ; Prepare digit 5 to display "6"
53 00000027 E601 out 0x01,al ; Send data out to make it happen
54
55 ; Digit 6
56 00000029 B0C7 mov al,0xC7 ; Prepare digit 6 to display "7"
57 0000002B E601 out 0x01,al ; Send data out to make it happen
58
59 ; Digit 7
60 0000002D B0E8 mov al,0xE8 ; Prepare digit 7 to display "8"
61 0000002F E601 out 0x01,al ; Send data out to make it happen
62
63 00000031 EBDE jmp display
64
65 ;****************************************************************
66 ; Chuck (G)'s code from Vintage Computer
67 ;****************************************************************
68
69 00000033 00<rept> times ((ROM_SIZE-16) - ($-$$)) db 0
70 000007F0 EA DB 0EAh
71 000007F1 [0000] dw Startup
72 000007F3 80FF dw 10000h-(ROM_SIZE/16) ; target segment
73 000007F5 00<rept> times ROM_SIZE - ($-$$) db 0
74
75 ;****************************************************************
I've studied the NASM manual, and I have like 5 different books about 8088-based systems and its assembly language. One of the books, likely a former university textbook (it has the typical "used" sticker commonly seen in college textbook stores on the binding - I got it from Amazon) doesn't even talk about setting or messing with SS or SP, saying it's the job of DOS, or the OS to do it, not the individual, but it has very good information about the instruction set otherwise. I've written the best code I can come up with, but I am still leaving open the possibility of a logical error on my part.
I have run out of ideas about how to test possible problems. I've checked and done everything I can think of, but I'm no computer engineer, just a hobbyist trying to see how far I can go lol.
So if anyone can help me figure out what's wrong, I'd appreciate it very much. Thanks a lot guys.
Last edited: