• Please review our updated Terms and Rules here

Stunning Motorola 68000 system made by Computer System Associates USA circa 1984

Any help on receiving serial data stream and multiplexing it on 89s52 which is another version of the 8051 (same pinout)
I have play some with multiplexing and can only get 4 seven segment to show the correct info, this is just using embedded text.
If you have display code that is partially working, can you post the source? I have a couple of AT89S52 chips here that I can debug with.

What hardware documentation did you use as reference to write the display code? Do you have a schematic drawing?
 
if you import this to Easyeda or open it with Kicad, it has what I have done for the display schematic,it is not complete
4D.zip is a 8051.asm file

I just wrote it from scratch, going from other code on the net, I may have more notes but would have to look for them since it has been over a year since I tried writing 8051 code.
 

Attachments

  • 4D.zip
    722 bytes · Views: 4
OK I printed the display to PDF, here it is
 

Attachments

  • 68000_display.pdf
    539.7 KB · Views: 14
Thanks, I have Kicad, so I can see the display file OK.

Which are the 4 display segments that are working?
 
I updated the schematic with some more details from my suitcase machine, especially the P3 connector pins. (Not sure if the Trainer's display board is identical.) Kicad substituted the MCU symbol with a new one, so if you have any problems reading it you might try upgrading Kicad.

Edit: Aw, heck, found an error already. The third keyboard column should go to P3-38, not P3-36.
 

Attachments

  • 68000_display_gh1.zip
    1.2 MB · Views: 6
Last edited:
Thanks for the update, I trying the code I posted it looks like it was the wrong file, I am still looking for the one where I had ds1 thru ds4 working to show numbers.
I will have more time on Friday and Saturday to look for it and run test. a lot of the stuff I have found does on work at all so the search goes on.
I have found one that cycles 0 thru F on ds1.
 
I'm studying up on the 8051 architecture and instruction set, I've never programmed one before. I wrote some code for an 8748 once, but that was about 40 years ago.
 
New update. Added more analog stuff on the 8751 board. The RESET button biasing looks wonky, but I've checked the schematic against the board several times and it's right. I'll just have to try the board under power and see what the voltages are.
 

Attachments

  • 68000_display_gh2.zip
    1.2 MB · Views: 5
Still searching for the code that would display 6800

did find some notes that show info for P2 output
All of these are for P2
0X00 = DS4
0X01 = DS8
0X02 = DS12
0X03 = CR 25 THRU 32
0X04 = DS16
0X05 = DS20
0X06 = CR57 THRU CR64
0X07 = DS24
0X08 = DS28
0X09 = UNKOWN
0X0A = UNKOWN
0X0B = UNKOWN
0X0C = UNKOWN
0X0D = UNKOWN
0X0E = UNKOWN
0X0F = UNKOWN
0X10 = DS3
0X20 = DS2
0X30 = DS1
0X31 = DS5
0X21 = DS6
0X11 = DS7
0X32 = DS9
0X38 = DS25
0X28 = DS26
0X18 = DS27
0X37 = DS21
0X27 = DS22
0X17 = DS23
0X40 = ALL OFF
0X22 = DS10
0X12 = DS11
0X13 = CR17 THRU 24
0X14= DS15
0X24 = DS14
0X34 = DS13
 
P2 bits 0 thru 3 selects one of the display groups (0 thru 9), bits 4 thru 6 select one of the columns (0-3). You can see the groups and columns in figure 3-8 on page 7 of the csa80.pdf file. I'll see if I can get the multiplexing sequence and timing numbers from my display board for you.

On the reset button, the input to U1 pin 1 on the SDI board reads 0.46V for a low, 1.55V for a high. The spec sheet for the 7406 says maximum for low is 0.2V. minimum for high is 2.0V, so they are both out of spec though it seems to work anyway. Not a good thing if you're sending the signal across a board with high-current switching, like a multiplexed LED display, because the induced noise can cause false values.

I think I can program the AT89S52 using avrdude, I found a configuration that should work. What I don't have is the hardware to connect the ISP programmer to the chip, but I've ordered a 40-pin ZIF socket so I can build one. (Though I just realized that an ATmega8515 is pin-compatible, that's another option.)
 
Sounds good, I will read the manual some more.
My notes where before I found the manual on ebay and are almost 2 years ago and are for the 8051 interface
 
From what I'm seeing, the multiplexing looks something like this:

while (1) for (column = 0; column < 4; column++) for (group = 0; group < 10; group++) P0 = data[group][column] P2 = 0xf0 + group /* strobe group latch */ P2 = 0xff P2 = (column << 4) + 0xf /* drive column */ delay_us(264) P2 = 0xff /* blank column */
 
while (1) for (column = 0; column < 4; column++) for (group = 0; group < 10; group++) P0 = data[group][column] P2 = 0xf0 + group /* strobe group latch */ P2 = 0xff P2 = (column << 4) + 0xf /* drive column */ delay_us(264) P2 = 0xff /* blank column */
Hello
I have tried your code but since my programming is almost not I can not figure out how define your column statements, so I just get errors when trying to build it.
 
It isn't real code since I thought you were working in assembler. It's just documentation (that sort of looks like C) of what the signals are doing.

You load the group latches while the column drive is turned off, then turn on the drive for the LEDs for that one column for about 264 microseconds before turning it off again. (You turn it off by selecting any column number greater than 3. I chose 0xf.) Repeat for each of the 4 columns, each column has a different set of data for the groups. (So, 4 columns X 10 groups = 40 bytes.)

Does that help?
 
This system was designed and built by Vic Wintriss in San Diego. I worked for him in 1976 when he was running Electronic Product Associates (EPA), they made a 6800 trainer. He now runs some kind of school. The name is "The League of Amazing Programmers". I'm sure a little searching on the WWW you will find some way to contact him. He is doing all kind of charity work, so seems like the kind of person that will help. Good Luck

Terry Foster

 
Last edited by a moderator:
YES it helps and I will try contacting Vic, He posted once back in 2014 or so and at that time he was no help

Thanks for the info
 
Still working on decoding the led's have 4 7 segment displays counting trying to get the first 8 counting have to figure out how to sent serial data to them
here is the try at getting 8 counting, it is having error. 8ACROSS_NEW2.C(182): error C141: syntax error near 'else'
 

Attachments

  • 8Across_new2.zip
    786 bytes · Views: 5
Are you really coding this with no indentation? Also you might want to look up how the "switch" statement works.

Anyhow your problem is no else-if before "//7-Seg Display 3".
 
Since I am learning as I go this is code fragments I found on the web and am using as a starting point.
I was also playing with some serial port code that will turn on and off segments but not the ones I want
any changes with working code would be great
 

Attachments

  • 51sera1.zip
    1 KB · Views: 5
First of all, you don't have all the display control lines defined. There are 15 of them total:
- segments a b c d e f g dp
- group select inputs D C B A for U11 to select a U1-U10 latch to load its segment data (set to 15 when not loading)
- digit select inputs C B A to select digit 0-3 in each group or 7 to blank the display

You seem to have the eight segments doubled up on P2.0 to P2.3 (that won't work), and the digit selects on P2.4 to P2.6, but you don't have anything to select U1-U10.

You will probably want a subroutine for each of the sets of bits: write_segments, write_digit (U12), write_group (U11)
It would look something like this:
(note that "!!" turns zero/non-zero into 0/1, and I'm assuming the P1/P2 bit layout)
(I might have the segment ordering mixed up too, but really it's just a bunch of pins on J3 that you need to get in the right order. And I had to look up that sbit thing, it's specific to 8051 stuff.)

Code:
sbit seg_a = P1^0; sbit seg_b = P1^1; sbit seg_c = P1^2; sbit seg_d = P1^3; 
sbit seg_e = P1^4; sbit seg_f = P1^5; sbit seg_g = P1^6; sbit seg_dp = p1^7;
void write_segments(char data)
{
  seg_a = !!(data & 0x01);
  seg_b = !!(data & 0x02);
  seg_c = !!(data & 0x04);
  seg_d = !!(data & 0x08);
  seg_e = !!(data & 0x10);
  seg_f = !!(data & 0x20);
  seg_g = !!(data & 0x40);
  seg_dp = !!(data & 0x80);
}

sbit group_A = P2^0; sbit group_B = P2^1; sbit group_C = P2^2; sbit group_D = P2^3;
#define GROUP_NONE 15
void write_group(char data)
{
  group_A = !!(data & 0x01);
  group_B = !!(data & 0x02);
  group_C = !!(data & 0x04);
  group_D = !!(data & 0x08);
}

sbit digit_A = P2^4; sbit digit_B = P2^5; sbit digit_C = P2^6;
#define DIGIT_BLANK 7
void write_digit(char data)
{
  digit_A = !!(data & 0x01);
  digit_B = !!(data & 0x02);
  digit_C = !!(data & 0x04);
}

That might not make the most efficient code, but it should be the most readable code.

I think the process is listed in Chapter 3 Page 22, but here is my interpretation of a full display scan by looking at the hardware:

You have with 10x4 bytes of memory to store the LED and segment bits. This gets updated by the comm routines.
start with the U12 digit set to 7 (blank) and the U11 group select set to 15
then for each of the four digit positions (0-3):
- for each group (0-9 / U1-U10):
- - select the group (U1-U10) latch by sending the group number (0-9) to U11
- - send the segment data for the current digit position in the group, probably mem[group*4+digit]
- - send 15 to U11 to lock the latch
- set the U12 digit select to the current digit (0-3) to light up that digit from every group
- wait about 25ms or so for the display to show
- set the U12 digit select to 7 (blank)

so...

Code:
char display_mem[4*10];

void scan_display()
{
  char group, digit;

  write_digit(DIGIT_BLANK);
  write_group(GROUP_NONE);

  for (digit = 0; digit < 4; digit++) {
    for (group = 0; group < 10; group++) {
      write_group(group);
      write_segments(display_mem[group*4 + digit]);
      write_group(GROUP_NONE);
    }
    write_digit(digit);
    delay_ms(25);
    write_digit(DIGIT_BLANK);
  }
}
 
Back
Top