Tag Archives: electronics

New Roms (eeprom)

Got some new roms in.
These are for my 8088/8086 the 6502 computer and C64 cartridges.

While I seldom had any problem writing to these, now I could not write one!
Erasing didnĀ“t give me an error?!?

henri@zspot:~/projects/wozmon8088/mon8086$ minipro -w mon8086.rom -p AT28C64
Found TL866II+ 04.2.129 (0x281)
Warning: Firmware is newer than expected.
  Expected  04.2.128 (0x280)
  Found     04.2.129 (0x281)
Erasing... 0.02Sec OK
Writing Code...  9.57Sec  OK
Reading Code...  0.12Sec  OK
Verification failed at address 0x0001: File=0xAA, Device=0xFF

Whenever you get this, check the markings of the chip!

Mine are AT28C64b !!!!!!!!!!!

Change your command accordingly.
Another thing to watchout for is write protect, look at the commands

minipro -l | grep 28C64 
Found TL866II+ 04.2.129 (0x281)
Warning: Firmware is newer than expected.
  Expected  04.2.128 (0x280)
  Found     04.2.129 (0x281)
AM28C64A@DIP28
AM28C64A@PLCC32
AM28C64A@SOIC28
AM28C64AE@DIP28
AM28C64AE@PLCC32
AM28C64AE@SOIC28
AM28C64B@DIP28
AM28C64B@PLCC32
AM28C64B@SOIC28
AM28C64BE@DIP28
AM28C64BE@PLCC32
AM28C64BE@SOIC28
AT28C64
AT28C64@PLCC32
AT28C64@SOIC28
AT28C64B
AT28C64B@PLCC32
AT28C64B@SOIC28
AT28C64E
AT28C64E@PLCC32
AT28C64E@SOIC28
AT28C64F
AT28C64F@PLCC32
AT28C64F@SOIC28
CAT28C64A
CAT28C64A@PLCC32
CAT28C64A@SOIC28
CAT28C64B
CAT28C64B@PLCC32
CAT28C64B@SOIC28
XLE28C64A
XLE28C64A@PLCC32
XLE28C64B
XLE28C64B@PLCC32
XLE28C64B@SOIC28
XLS28C64A
XLS28C64A@PLCC32
XLS28C64B
XLS28C64B@PLCC32
XLS28C64B@SOIC28
28C64A
28C64A@PLCC32
28C64A@SOIC28
28C64AF
28C64AF@PLCC32
28C64AF@SOIC28
28C64B
28C64B@PLCC32
28C64B@SOIC28
UPD28C64
UPD28C64@SOIC28
KM28C64A
KM28C64A@PLCC32
M28C64
M28C64@PLCC32
M28C64@SOIC28
M28C64A
M28C64A@PLCC32
M28C64A@SOIC28
M28C64-xxW
M28C64-xxW@PLCC32
M28C64-xxW@SOIC28
M28C64
M28C64@PLCC32
M28C64@SOIC28
M28C64A
M28C64A@PLCC32
M28C64A@SOIC28
M28C64-xxW
M28C64-xxW@PLCC32
M28C64-xxW@SOIC28
X28C64

Laser XT/3 Bios

As posted before

I really like GlaBios for my 8088, so today I got my Laser XT/3 8086 machine from the attic.

Mmm TWO ROM’s thats interesting

Looking futher in the schematics I found this. Apparantly there is a 8K ROM configured in a D0-D7 + D8-D15 setup. (16 bits)

Found a technical manual, this is a excerpt.

In Turbo XT, there are two 28-pin sockets for ROM, one of them is
occupied by a 2764 which stored the BIOS (Basic Input Output System).
The other empty socket is used to house a 32K ROM, such as the BASIC
ROM

And about the XT/3 version which I have.

In Turbo XT /2 and Turbo XT /3, there are two 28-pin sockets for ROM,
both of them are occupied by 2764 which stored the BIOS. The contents
of the two 2764 are identical. One of them contribute the ODD Byte to the system and the other EVEN Byte. Together they support 16 Bit BIOS
access.

This could be an interesting chat with Greg ..

Meanwhile i’m going to look how to split a rom into odd/even.
Maybe i have to write a little python program for this.

Well, thats enough for today.

Lets fix my Cat S60 Flir phone, so i can track the hedgehog in our garden. (Battery replacement and powerbutton fix)

I fixed several phones before, (broken screen. touch not working). But I hate how some manufacturers build them.

Another logic probe

I’ve build a logic probe a while ago. (Mentioned here)

Today I got the EIStar LP-1. Its just a cheap easy probe, but does the job.
My version is only TTL and this one is TTL/CMOS (cmos is better when measuring arduino’s outputs)
TTL – Logic 1 = 4.75 -> 5V
CMOS – Logic 1 = more around the 3.3/3.7V

Only thing my version has which i’m missing is a pulse detector.
One millisecond puls gets clocked into a latch and keeps a led on.

Schematic I found (some similarities can be seen with my version)

From freeshell website

ISA prototyping board – IO chips

Followup on

UPDATE 20230702 20230703 20230714

While working on a Lidar project, my mouser components came in.

Now I have to find a IO address decoder schematic I made a while ago.

This ISA board is going to have a Wirewrapped setup. There is a 8255 IO chip, and uses 3x 74138 for IO address decoding, OR i will use a setup i’ve made for my 6502 using an atf22v10.

What to controll using this 8255? First some Leds, later a LCD display.

Below the 3 mentioned IC’s

The 8255 is a chip like the 6522 used in my DIY 6502 elsewhere on my site.

Overview of comparable IO chips. ( Not interchangeable due to bus timing!)
Most of them have 8 data lines and 2x 8 IO bi-directional lines.

CHIPNOTES
65226502 based machines
82558088/8068 based machines
Z84C2008Z80 (called PIO)
81558085 / 8088
852068000 amiga
68216800

6821 example

UPDATE 20230702

Started wirewrapping, luckily i’ve got a big choice of colors. That makes finding the right signals a breeze.

UPDATE 20230703

Found my schematic

Above uses 3 74138 decoders, address can be “programmed” using jumpers (not used on my prototype board) . Address 0400h in above example.

A15 – 0
A14,13,12 – decodes to OUT-0
A11 – 0
A10,9,8 – decodes to OUT-4
A7 – 0
A6,5,4 – decodes to OUT-0
A3 and A2 are not used (see note)
A1 and A0 are register select on the 8255

Address 0000,0100,0000,xxrr
xx can be a 0 or 1
the 8255 can be controlled using
0400h 0401h 0402h
but also
0404h 0405h 0406h
0408h 0409h ….
040Ch ……

UPDATE 20230714 – Alternative address decode test with ATF22V10

UPDATE 20230803

UPDATE

Miswired second 74138.
Tested with below code

mov dx,503h # control register
mov al,80h # output port a,b,c as standard IO/output
out dx,al # 16 bit IO mapped IO out
mov dx,500h # data register
mov al,0  # 0/ff all on/all off
out dx,al

Micro cassettes with computer programs.

I’ve got some micro cassettes with programs for P2000 and the Microtrainer (SDK-85).

Lets try to get this into executable code again.

(I sold my Philips P2000 last year before I found these tapes)

I bought a Cassette player (voice memo recorder) from Marktplaats (dutch ebay), and a mini jack cable (2.5mm to 3.5mm)

There are two things i’m going to try.

Converting the recorded audio into executable code using python or Puredata.
And making a print to connect the tape player to the SDK-85.

Connecting the player to a soundcard gave me:
Signed 16bit 44.1 kHz

(there are simular projects like this for C64 tapes and alike)
So there will be FFT tricks involved.

While browsing though this book:

I found this schematic: (page A1-39)

So that’s next to build

ISA Prototyping print

Got a delivery today …
Woot .. let the 8088/v20 hardware hacking commence!

https://www.pcbway.com/project/shareproject/PC_XT_ISA_8_bit_retro_Protoboard.html

First to do: LEDs, everybody loves blinking leds.
Next: Probably a address decoder with a VIA/CIA and a LCD Display.

Now I have to wait for my mouser order to be delivered.

SDK-85 Cassettes

Started drawing a Cassette interface in Kicad.
This so i can read back my old cassettes with programs.
(And write some new stuff)

I’m planning to buy a small micro cassette player.
With schematic below, I’m going to use it as save/load device.
But also with the same player, I’m going to convert the tape to a wave file, and try to decode the program using python.

While I’m at it, reading the old manuals, a RS-232 interface would be nice also!

UPDATE 20231016

This is the final version

Information about the 7655A.
A eprom WITH IO ports! Amazing piece of history hardware.

Testing some sims on Linux and Android

Last weeks useful schematics

While working on my game, i had to come up with some solutions i could not find an answer for on the internet.

I’m not going to post every little detail of my game on this blog, my main reason is sharing my experiences and solutions.

16 SWITCHES

16 Switches on a Wemos Arduino. While push buttons are easier to connect, I needed ON/OFF switches.
Push buttons are easy, there is only one active, so 4 enable lines and 4 scan lines and you’re golden.
16 Switches can be enabled all at the same time.
So you need some extra components to get a good result (0-65535)

Above schematic works, you need 4x 1k Pull-up resistors and 16 diodes. I used 1N4007

CONTROLLING 24V using Arduino and a buck convertor

Next problem, i’m using some elevator buttons for a project. These have build-in leds but run at 24V.
I only have 5V from the Arduino.
Regular leds you can connect directly to the Arduino using a 220ohm resistor.
So i used a Buck-Step-Up-Convertor. This little module converts 5V to 24V. (You can control the output voltage using a variable resistor)
To control the lamp/leds i used a PN2222a transistor to switch the lights on/off using a pin of the Arduino.

MT3608 Convertor
  • Input voltage: 2V-24V DC
  • Output voltage: 5V-28V DC
  • Output current: 2A (max), 1A (recommended), <100mA (input <4.0V), <50mA (input <3.5V)

Mobile Raspberry Access Point with Mqtt and a display

UPDATE: 20230214 / 20230224

Install Bullseye on a SDCard

Enable wifi country code using raspi-conf
(While you at it, enable I2C for the display)

Install and configure an Access Point

# As root
apt update
apt upgrade
apt install hostapd
apt install dnsmasq
systemctl stop hostapd
systemctl stop dnsmasq

cat <<EOF > /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=escape
hw_mode=g
channel=6
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=mysecretpass
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
EOF

cat <<EOF >> /etc/dnsmasq.conf
interface=wlan0
bind-dynamic
domain-needed
bogus-priv
dhcp-range=192.168.50.150,192.168.50.200,255.255.255.0,12h
EOF

cat <<EOF >> /etc/dhcpcd.conf
interface wlan0
nohook wpa_supplicant
static ip_address=192.168.50.10/24
static routers=192.168.50.1
static domain_name_servers=8.8.8.8
EOF

sed -i s/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g /etc/sysctl.conf


mkdir /etc/nftables
cat <<EOF > /etc/nftables/nft-stat-ap.nft
flush ruleset

table inet ap {
        chain routethrough {
                type nat hook postrouting priority filter; policy accept;
                oifname "eth0" masquerade
        }

        chain fward {
                type filter hook forward priority filter; policy accept;
                iifname "eth0" oifname "wlan0" ct state established,related accept
                iifname "wlan0" oifname "eth0" accept
        }
}
EOF

chmod +x /etc/nftables/nft-stat-ap.nft
cat /etc/nftables.conf | grep nft-stat-ap.nft || echo 'include "/etc/nftables/nft-stat-ap.nft"' >> /etc/nftables.conf

systemctl unmask hostapd
systemctl enable hostapd
systemctl enable nftables

reboot

UPDATE: 20230214

Now in its case, added two buttons and one led.

UPDATE : 20230224 mqtt config

apt-get install mosquitto mosquitto-clients

vi /etc/mosquitto/conf.d/remotemqtt.conf
per_listener_settings true
# internal mqtt
listener 1883
allow_anonymous true
# connection over the internet
connection bridge-01
address remoteserver:8883
bridge_cafile /etc/mosquitto/certs/ca.crt
bridge_keyfile /etc/mosquitto/certs/remoteaccesspoint.key
bridge_certfile /etc/mosquitto/certs/remoteaccesspoint.crt
topic escape/# both 0
remote_username remoteuser
remote_password remotepass

########## remote server config

cd /etc/mosquitto
mosquitto_passwd passwords remoteuser

cd /etc/mosquitto/certs
./generate-CA.sh client remoteaccesspoint

copy ca.crt remoteaccesspoint.key and remoteaccesspoint.crt to accesspoint

mosquitto.conf
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
#per_listener_settings true
# Plain MQTT protocol
listener 1883
allow_anonymous true
# End of plain MQTT configuration
# MQTT over TLS/SSL
listener 8883
cafile /etc/mosquitto/certs/ca.crt
certfile /etc/mosquitto/certs/webserver.fash.lab.crt
keyfile /etc/mosquitto/certs/webserver.fash.lab.key
allow_anonymous false
password_file /etc/mosquitto/passwords
# End of MQTT over TLS/SLL configuration
listener 9001
protocol websockets
# End of plain Websockets configuration
# WebSockets over TLS/SSL
listener 9883
protocol websockets
cafile /etc/mosquitto/certs/ca.crt
certfile /etc/mosquitto/certs/webserver.fash.lab.crt
keyfile /etc/mosquitto/certs/webserver.fash.lab.key
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
connection bridge-01
address extramqttserver:1883
topic lscspm1/# both 0
topic owntracks/# both 0
topic escape/# both 0

log_type all


Controlling Display and MQTT messages examples

apt-get install python3-smbus

python3 printline.py -1 "line 1" -2 "line 2"

wget https://github.com/emcniece/rpi-lcd/blob/master/RPi_I2C_driver.py

cat printline.py
# requires RPi_I2C_driver.py
import RPi_I2C_driver
from time import *
import sys, getopt

#python3 fix
unichr = chr 

mylcd = RPi_I2C_driver.lcd()
# test 2                  1234567812345678


def main(argv):
   line1 = ''
   line2 = ''
   try:
      opts, args = getopt.getopt(argv,"h1:2:",["txt1=","txt2="])
   except getopt.GetoptError:
      print ('printline.py -1 <line1> -2 <line2>')
      sys.exit(2)
   for opt, arg in opts:
      if opt == '-h':
         print ('printline.py -1 <line1> -2 <line2>')
         sys.exit()
      elif opt in ("-1", "--txt1"):
         line1 = arg
      elif opt in ("-2", "--txt2"):
         line2 = arg

   mylcd.lcd_display_string(line1, 1)
   mylcd.lcd_display_string(line2, 2)
if __name__ == "__main__":
   main(sys.argv[1:])

Print internal and external ip

myip=$(/usr/sbin/ifconfig eth0 | grep "inet " | awk '{ print $2 }')
extip=$(curl -s http://whatismyip.akamai.com/)
python3 printline.py -1 "i $myip" -2 "e $extip"

mosquitto health tester

timeout 1 mosquitto_sub -t '$SYS/#' -C 1 | grep -v Error || exit 1

Button press shutdown

raspi-gpio get 27  | grep level=0 >/dev/null 
if [ $? == 0 ] ; then

python3 printline.py -1 "shutting" -2 "down"
/usr/sbin/halt -p
fi

Cleaned-up minimal mqtt poster

#include <WiFi.h>
#include <PubSubClient.h>

const char* ssid = "ssidname";
const char* password = "ssidpass";
const char* mqttServer = "192.168.50.10";

WiFiClient espClient;
PubSubClient client(espClient);


void initWiFi() {
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  Serial.print("Connecting to WiFi ..");
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print('.');
    delay(1000);
  }
  Serial.println(WiFi.localIP());
}


void setup() {
Serial.begin(115200);
initWiFi();
  Serial.print("RRSI: ");
  Serial.println(WiFi.RSSI());
    client.setClient(espClient);
    client.setServer(mqttServer,1883);
 if (client.connect("testmodule")) {

      Serial.println("connected");
 client.publish("escape/testclient", "connected");
    } else {
            Serial.println("Mqtt not connected");
    }

}

void loop() {
        }

}