4th Sep 2020, 5:47 pm | #181 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
|
Re: Mk14 vdu
Yes that works fine on my clone VDU as well for composite to my Phillips CRT. If the modulator is out of circuit it needs the mods above to generate a lower signal which is much more intrusive on an original than two clips on the bare modulator wires.
Great to see more original machines. |
21st Sep 2020, 6:56 pm | #182 |
Rest in Peace
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
|
Re: Mk14 vdu
I have a question regarding the Mk14 VDU graphics mode. Am I right in thinking that each byte from memory maps to a row of 8 pixels? Is the leftmost of these controlled by bit 0 of the byte?
Someone in this thread prepared a file of images for demonstrating the VDU. I'd be grateful for a copy of these, preferably in intel hex format (but I can probably get by with raw binary). |
21st Sep 2020, 7:30 pm | #183 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Mk14 vdu
At risk of stating the obvious, after looking at the VDU schematic until my head gave in, it appears that in graphics mode the character clock appears to be half than when in character mode, IE there are 8 bytes across in graphics mode and 16 bytes in character. I presume that each line of 8 bytes is repeated 4 times so that the full 512 bytes of memory produces a 64 lines of pixels spread over the 256 visible scan lines.
Sirius in an earlier post #112 on page 6 { https://www.vintage-radio.net/forum/...&postcount=112 } has the intel hex files for the images mapped to 0x200-0x3FF zipped up. As for the bit/byte order I'll leave it to him to confirm because I'm sure he has mentioned it but I cant find it..... |
21st Sep 2020, 7:39 pm | #184 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
|
Re: Mk14 vdu
Hi Karen,
Each byte maps to 8 graphics-mode pixels and the -rightmost- pixel in each set of eight is represented by bit 0 of the corresponding byte, the -leftmost- pixel in each block of 8 is represented by bit 7 of the byte. So hex value = 0x01 would light up the rightmost pixel of 8, hex value = 0x80 would light up the leftmost pixel of 8. For each 256-byte page displayed on either the upper or lower half of the screen the first byte of the page corresponds to the first 8 pixels shown on that screen half (upper left) and the last byte of the page corresponds to the last 8 pixels shown on that screen half (lower right). The images you referred to were posted in #109 of this thread and the corresponding files were posted in a .zip attached to #112 of this thread. The files are Intel Hex, mapped to 0x200-0x3FF but you can obviously load them into an editor, block copy them to some other address range and save them with whatever address range you want. |
22nd Sep 2020, 12:43 am | #185 |
Rest in Peace
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
|
Re: Mk14 vdu
The PIC serial port I have in mind for video generation transmits the LSB first, so I'm going to have to reverse the bits. That's a look-up table jobby. Fortunately, each graphics mode byte is 16 instructions so there should be time.
Character mode is the more pressing, so much so that I'll probably have to implement inverse video as an alternative font (i.e. an extra bit to the character codes). |
22nd Sep 2020, 1:11 am | #186 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
|
Re: Mk14 vdu
If you can spare 15 minutes out from the pure software side of things at some point, a rough hand sketch of your proposed composite video output stage would be useful so we can have that already built by the time it is needed.
I have a chunk of veroboard which I put together years ago with everything on it that a 40-pin PIC needs, sort of a PIC-based Pre-Arduino - It has an ICSP programming header, regulator, reset circuit, a socket for a crystal, and all the port pins and supply rails broken out to screw terminals. I made it so that I could throw together and test prototypes of 40-pin PIC projects in a very short time, and it could come in handy again here. I have a 32-way DIN a/b male connector on the way (same as the one on my actual SOC VDU) and I'll attach flying leads to that which I can quickly wire into this PIC board once I know which PIC port pins you've used for what purposes. |
22nd Sep 2020, 12:17 pm | #187 |
Rest in Peace
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
|
Re: Mk14 vdu
Here's my preliminary wiring plan. I might have to change this if I run into trouble but I'm quietly confident:
Port/pin/connector/designation RB0 33 a2 A0 RB1 34 a3 A1 RB2 35 a4 A2 RB3 36 a5 A3 RB4 37 a6 A4 RB5 38 a7 A5 RB6 39 a8 A6 RB7 40 a9 A7 RA0 2 a10 A8 RA1 3 a11 A9 RA2 4 a12 A10 RA3 5 a13 A11 RD0 19 a18 D0 RD1 20 a19 D1 RD2 21 a20 D2 RD3 22 a21 D3 RD4 27 a22 D4 RD5 28 a23 D5 RD6 29 a24 D6 RD7 30 a25 D7 RA4 6 a28 NRDS RA5 7 a31 NENIN RE0 8 b9 PS1 * RE1 9 b10 PS2 * RE2 10 b11 PS3 * RE3 1 b12 PS4 * RC0 15 b13 /VDUON * RC1 16 b14 GRPH/CHARS * RC2 17 b15 /SWAP * RC3 18 b16 /INVRSE * RC4 23 b17 TOPPGE * Has 10k pull-up RC5 24 Video sync RC6 25 Serial clock (not used) RC7 26 Video luminance The PIC has six additional pins: 11 +5V 12 GND 13 / Crystal 14 / 31 GND 32 +5V Video output circuit to follow... Last edited by Karen O; 22nd Sep 2020 at 12:34 pm. Reason: Minor typo |
22nd Sep 2020, 1:52 pm | #188 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
|
Re: Mk14 vdu
OK, that's all impressively efficient and precise. I will assume you're still going with PIC16F887 and 16MHz unless you tell me otherwise.
Just need the connector to arrive and I'll get on with wiring that up. If the video output circuit can be the same as the circuit used in one of your other projects, just point me to the relevant project and I will lift it from there. |
22nd Sep 2020, 11:36 pm | #189 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
|
Re: Mk14 vdu
After a bit of hunting high and low I have found my 40-pin 'PICduino'. Quite a tidy looking board, because (as usual for me) all the utter chaos is hidden underneath.
I notice I must have dedicated PE3 to an alternative function (...reset input) and I never brought it out to the screw terminals, but obviously I will need to do that now. I'll just 'convert' the 0V terminal second from right to PE3. |
23rd Sep 2020, 10:43 am | #190 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Mk14 vdu
Nice crystal socket!
|
23rd Sep 2020, 10:51 am | #191 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
|
Re: Mk14 vdu
Yes, I forgot I'd done it that way. Conventional wisdom says that a screw block terminal should have terrible high frequency characteristics but in reality the PCB works fine with up to 20MHz crystals.
I kept the leads / tracks as short as possible, and the associated low value capacitors down to 0V are SM parts soldered directly between the screw terminal pins and 0V on the 'track' side. The supply decoupling capacitors are also SM types, soldered on the track side. |
23rd Sep 2020, 11:25 am | #192 |
Rest in Peace
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
|
Re: Mk14 vdu
SH,
Yes, the PIC is a PIC16F887. My preference is the PIC16F877 but that device doesn't have enough I/Os. And it uses a 16MHz crystal. For the video mixer/buffer, try the circuit in the attachment. It should work with a wide range of impedances, from standard 75 Ohm to the 1500 Ohm-or-so of a Chinese mini-telly. Feel free to fiddle the values. So long as it produces something close to correct levels, you should be able to get a stable picture on an attached monitor. Is this a first? - a complete hardware design from a hospital bed PS. Sorry for the poor image quality. I took it with my crummy phone then Bluetoothed it to my laptop. Last edited by Karen O; 23rd Sep 2020 at 11:27 am. Reason: Add postscript |
23rd Sep 2020, 11:38 am | #193 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
|
Re: Mk14 vdu
Thanks for the video output circuit - I'll bash that up some time today. BC547 OK? I happen to have some right here.
We thought you were comfortably installed in a hospice, Karen, so you're doing very well to get all this down with all the mayhem of a hospital swirling around you. If you need to put up any more drawings, maybe try just holding them up to the laptop's webcam and using something on the laptop to capture the image. Webcams are rarely super high resolution though, I admit. |
23rd Sep 2020, 12:15 pm | #194 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Mk14 vdu
I would imagine if you had the right gear you'd be able to detect some change in the stability or a slight pulling in the frequency but considering people routinely plug crystals into breadboard with no ptoblems and the tolerance of the loading capacitance makes a bigger impact of frequency I wouldnt worry. Unless I was making a missile guidance system or fitting it in a jumbo jet. Your "Picduino" looks really neat - I guessed you'd used SMD capacitors on the back from your other projects
|
23rd Sep 2020, 12:18 pm | #195 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Mk14 vdu
Well my 1.5k Memory upgrade and NIBL adaptor were designed on paper from my hospital bed The latter has yet to be tested and the former was hardly rocket science though! But yours is analogue voodoo as far as I'm concerned
|
23rd Sep 2020, 12:21 pm | #196 | |
Rest in Peace
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
|
Re: Mk14 vdu
Quote:
BC547 should be fine, in fact, my personal choice. |
|
23rd Sep 2020, 12:30 pm | #197 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
|
Re: Mk14 vdu
I would show a picture of the other side of the PIC PCB, but some of you might be afraid of spiders.
Connector has not arrived as yet so I'll focus on the video-out slab for now. |
23rd Sep 2020, 7:23 pm | #198 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
|
Re: Mk14 vdu
My bits for the PIC14 on Phil's PCB arrived today and Slothie's BOM had 20Mhz crystals - at least I have one already for when I get a 16F887 to build one of these VDU things. Shame it isn't an 877 I have over 20 of them - bargain when I was looking for 2...
|
23rd Sep 2020, 7:41 pm | #199 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Mk14 vdu
Is the BOM wrong? The "Picv4.pdf" I worked from had a 20MHz crystal specified....
|
23rd Sep 2020, 7:55 pm | #200 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
|
Re: Mk14 vdu
It is a 20MHz crystal for the PIC14, but a 16MHz crystal for the PIC-VDU (which is what I am provisionally calling it - as the originator, Karen will have to think of an official name for it).
I have four spare 16MHz crystals here should anyone need one, although you can probably get them just as quickly from your supplier of choice. I think the 16F887 has one or two more pins which can be designated as general I/O pins when compared with the 16F877, unfortunately those extra one or two pins make all the difference in the case of the VDU project. The little video-out circuit is built and connected to the 'PICduino' so now I just need the connector to turn up so I can wire that up to it. |