Want to sent bin files to Mega where they will be put into vRAM[] to be used when running 1802 in slow mode, just as if they were in ROM, the bytes.
Practiced using Uno with little program that waits for BrayTerm++ to send a bin file that was the output of an a18.exe assembly process.
Looks a bit like this below.
Bray Terminal Program keeps being best of its kind and may be used in this project instead of Arduino's terminal.
Sunday, March 22, 2020
Where we are at 23/3/2020 with 1802
Where we are at 23/3/2020 with 1802 project.
Have 1802 hooked up to Arduino Mega2650 and running little programs that, for instance turn Q LED on and off. Very slow clock goes about 10Hz.
Have 1802 hooked up to Arduino Mega2650 and running little programs that, for instance turn Q LED on and off. Very slow clock goes about 10Hz.
1802 Connect to Arduino Mega
The pin connections are given in next two pictures.
The program and the serial output that flicked Q led up and down.
Program at https://pastebin.com/sGEdvU9C
Movie of Mega/1802 combination.
Big green LED, closest to camera is Q pin of 1802.
Big red and yellow LEDS on bread board are MA0, and MA1 respectively. (Address lines 0,1)
Little flashing LED on mega reflects clock being fed into 1802 from Pin13=PB7.
Note, program being sent is in vRAM array:
byte vRAM[256] = {0x7b, 0x7a, 0x7b, 0x7a, 0x30, 0x00,0x00};
Here, 0x7b is SEQ and 0x7a is REQ, ie. LED on and off respectively.
0x30,0x00 is 1802 code for BR Start, ie BR 00 ie branch to start at 0x00.
The final 0x00 is never executed but stands for IDL, idle.
Friday, March 20, 2020
Thursday, March 19, 2020
Wednesday, March 18, 2020
Short program with loop back to start.
Wrote short assembler program to flick Q flag up and down with loop. Worked as expected.
byte vRAM[7] = {0x7b, 0x7b, 0x7a, 0x7b, 0x30, 0x00,0x00}; //ie seq,seq,req,seq,br start, idl
byte vRAM[7] = {0x7b, 0x7b, 0x7a, 0x7b, 0x30, 0x00,0x00}; //ie seq,seq,req,seq,br start, idl
Set up instruction array, called vRAM[], like this: byte vRAM[5] = {0xc4, 0xc4, 0xc4, 0xc4, 0x00};
Set up instruction array, called vRAM[], like this:
byte vRAM[5] = {0xc4, 0xc4, 0xc4, 0xc4, 0x00}; //Vram[] holds instructions
Note 1802 is reset, then fetches first $c4, then second etc. When adr = 5 it comes to instruction 0x00, that is IDL = idle, just step on spot and repeat IDL.
Worked as expected. Good. Should end all instruction arrays with IDL as it's a good and predictable stopper.
byte vRAM[5] = {0xc4, 0xc4, 0xc4, 0xc4, 0x00}; //Vram[] holds instructions
Note 1802 is reset, then fetches first $c4, then second etc. When adr = 5 it comes to instruction 0x00, that is IDL = idle, just step on spot and repeat IDL.
Worked as expected. Good. Should end all instruction arrays with IDL as it's a good and predictable stopper.
Arduino sends constant nop
1802 talks to Arduino Mega.
If a constant $c4 = nop is output from PORTC of mega to BUS of 1802 it always fetches a nop, just as it did in first version where nop was hard wired with resistors to rails.
Working as predicted.
Next version will just output a $c4 during instruction fetch, or rather during TPB=high.
If a constant $c4 = nop is output from PORTC of mega to BUS of 1802 it always fetches a nop, just as it did in first version where nop was hard wired with resistors to rails.
Working as predicted.
Next version will just output a $c4 during instruction fetch, or rather during TPB=high.
Thursday, March 12, 2020
Monday, March 9, 2020
Subscribe to:
Posts (Atom)
Pi Pico and other Boards
Got a new Pi Pico and it looks very promising. Want to use Oled display with it.
-
Think I've got it. On 1802 I/O is almost like DMA. For OUT 1 (0x61) the byte cycle after instruction fetch puts the address in R(x) ...
-
Where we are at 23/3/2020 with 1802 project. Have 1802 hooked up to Arduino Mega2650 and running little programs that, for instance turn Q ...
-
JUst completed Mega 2650 board shield with 1802 on it. Used EasyEDA and sent design to JLPCB. Here's Schematic: and here's the p...