Skip to content

Ugly But it Works – Segment Addressing on the Boyd Calculator

January 24, 2018

This is truly ugly but perseverance is important, or something..


I brought up 3 data lines from the CPU board on some flying leads and hacked them on to the display chip. I had to desolder one pin of the chip to isolate it from +V. The display can now be switched from hex to what they call CODEB(0-9 plus some extras) or undecoded. The mode depends on the control character you send with Q active. If you turn off the decoding each bit in the characters you send controls a segment. I can probably find a C header where someone has done the work but for now i just cobbled up enough characters to see my name in lights.

The bit mapping from the data to the LED segments is in the datasheet:
IMG_0721

;testing output to the boyd LED segments
	relaxed on
	req
	seq
	sex 0
	out 7
	db  0xff ; segment data, no decoding
	req

	out 7
	db  d
	out 7
	db y
	out 7
	db  o
	out 7
	db  b
	out 7
	db  L
	out 7
	db  L
	out 7
	db  one
	out 7
	db  b

	br  $
A	equ 0b01111110 ;A
b	equ 0b00011111 ;b
C	equ 0b01001011 ;C
d	equ 0b00111101 ;d
i	equ 0b00010000 ;i
L	equ 0b00001011 ;L
o	equ 0b00011101 ;o
y	equ 0b00110111 ;y
zero	equ 0b01111011 ;0
one	equ 0b00110000 ;1
two	equ 0b01101101 ;2
eight	equ 0b01111111 ;8
sp	equ 0

I guess that mapping of bits to segments is not universal. This page has a nice table of characters to segments that implies the segments are addressed from bit 7 to bit 0 as dec. point,a,b,c,d,e,f,g where the 7218 is doing dec point,a,b,c,e,g,f,d. At least the top 4 bits are the same so i could map the table by hand like his L is 0x0E 0b00001110 would be 0x0B which matches.

Also, here’s a nice page on the 7218. And here’s another page on the 7218 which links to code with an alphabet table that i can use directly.

I’ll embed the code directly in case that link rots:

/* Segment numbering

  _0x40_
|        |
0x02     0x20
|        |
  _0x04_
|        |
0x08     0x10
|        |
  _0x01_

*/
  
unsigned char segments[] = {
  /* Control chars */
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

  /* Symbols and numbers */
  0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x20, /*  !"#$%&' */
  0x00, 0x00, 0x00, 0x00, 0x11, 0x04, 0x00, 0x2c, /* ()*+,-./ */
  0x7b, 0x30, 0x6d, 0x75, 0x36, 0x57, 0x5f, 0x70, /* 01234567 */
  0x7f, 0x77, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, /* 89:;<=>? */

  /* Uppercase */
  0x6f, 0x7e, 0x1f, 0x4b, 0x3d, 0x4f, 0x4e, 0x5b, /* @ABCDEFG */
  0x3e, 0x10, 0x39, 0x5e, 0x0b, 0x58, 0x1c, 0x1d, /* HIJKLMNO */
  0x6e, 0x67, 0x0c, 0x53, 0x0f, 0x3b, 0x19, 0x23, /* PQRSTUVW */
  0x5c, 0x37, 0x69, 0x00, 0x16, 0x00, 0x00, 0x01, /* XYZ[\]^_ */

  /* Lowercase */
  0x06, 0x7e, 0x1f, 0x4b, 0x3d, 0x4f, 0x4e, 0x5b, /* `abcdefg */
  0x3e, 0x10, 0x39, 0x5e, 0x0b, 0x58, 0x1c, 0x1d, /* hijklmno */
  0x6e, 0x67, 0x0c, 0x53, 0x0f, 0x3b, 0x19, 0x23, /* pqrstuvw */
  0x5c, 0x37, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, /* xyz{|}~  */
};
Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: