Raspberry Pi Pico talks to Intel 80188 as I/O device

Поделиться
HTML-код
  • Опубликовано: 1 май 2023
  • This video has been sponsored by PCBWay.com - Standard PCBs, Advanced PCBs, Flex PCBs, PCB Assembly, 3D printing, CNC machining - it's all there!
    Check out their website at pcbway.com/ - PCB prices start from as little as $5!
    The Raspberry Pi Pico microcontroller talks to the Intel 80C188 as an I/O device using its PIO - Programmable I/O block.
    You will see:
    - all my fixes I've made to my Slador188 computer's PCB
    - how the Pico is connected to the address/data bus of the 80188
    - detailed explanation of how the PIO programme talks to the Intel CPU via the GPIO pins
    - how to initialise the PIO and use its interrupts to transfer data between the GPIOs and the ARM core
    - how to handle the interrupts from the PIO in the C code running on the RP2040 ARM core
    - the tests where we use the Pico as the Intel CPU's I/O peripheral device
    Visit my webpage slador.uk/ to find the list of all my videos and all the supporting materials.
    You can find there schematics of this computer at every stage of building it during the videos as well as the source code of all the programmes I write for this series.
    slador.uk/
  • НаукаНаука

Комментарии • 28

  • @steventaylor6294
    @steventaylor6294 7 месяцев назад +1

    I really love your videos and your patient, structured delivery of the information. Thank you for taking to time to make these, it's really appreciated.

    • @SladorSoft
      @SladorSoft  7 месяцев назад

      Thank you very much for your kind words. I'm looking forward to record more videos after a long break as I have so much more to share with. I'll be back shortly after the New Year.

  • @GodmanchesterGoblin
    @GodmanchesterGoblin Год назад

    Another great video with very clear explanation. Thanks.

  • @poiitidis
    @poiitidis 7 месяцев назад

    Great explanation, impressive video!

  • @sonnybalut
    @sonnybalut Год назад

    Thank you for a very thorough explanation.

  • @nelsonamador5412
    @nelsonamador5412 Год назад

    Great topic and thanks for sharing

  • @zitt
    @zitt Год назад +3

    Why not use the RTC in the Pico?
    IF you swap the pico to a Pico-W; you can use Wireless to NTP the RTC with the latest time and store it in the Pico RTC.

    • @SladorSoft
      @SladorSoft  Год назад +1

      @John Zitterkopf The Pico-W is my (further) future feature to consider. Before that happens I would like to have a fully working retro computer though. The Pico's RTC isn't really a proper RTC - it's just really a counter working only when the Pico is supplied with power - there is no separate battery backup or even an oscillator. It is much simpler to add the 1285 chip which is easily available (and cheap). Having said that, I can see that when I add the Wi-Fi feature at some point, I could synchronise the RTC with the current time from the Internet ;-)

  • @fromgermany271
    @fromgermany271 11 месяцев назад +1

    Assuming a 4MHz 80188, one of the Pico cores would have 30 instructions to emulate the intel silicon. The other would be free to coordinate the PIOs state machines to act as the peripherals.
    Just a thought. 😂

    • @SladorSoft
      @SladorSoft  11 месяцев назад +1

      @fromgermany271 are you thinking about emulating only the chip itself in the Pico, or the whole computer?
      In the former case, I don't think it would be possible, because it would require doing it in software and even if the PIO is much faster than the 80188 speed, the whole emulation would require PIO -> interrupt -> software -> PIO loop on each tick, which seems to be slower than 1 clock cycle of the 80188.
      The latter case (emulating a 80188 computer), paradoxically, could be more plausible, but the Pico does not seem to have enough RAM to emulate the computer's memory as well as some video memory, because we would need to emulate the video card as well.
      I'm quite confident that in case of retro micros based on 6502 or Z80 (Atari, Commodore, ZX Spectrum, BBC Micro etc) it would definitely be possible to emulate using the Pico. I might do it one day ;-)
      Cheers!

  • @BLSrr
    @BLSrr Год назад +1

    Question about the way you do this design, we only see here the end result (the final code) but how did you do the design which made you write the code. What kind of methods did you use I'm curious.

    • @SladorSoft
      @SladorSoft  Год назад

      The shortest answer: I didn't ;-)
      Slightly longer: it's all more an educated guess rather than a design.
      Let me elaborate a little bit on that. In terms of the code: it was so simple, that there wasn't even much space to design anything. It was more like "Hello World" for each video rather than a complete functionality.
      In terms of the hardware, I hoped to build a working computer since I started doing my videos, but at the time I didn't have concrete ideas of how I could achieve that. I wanted to build it using easily available components, not a PC-compatible replica, so I didn't have a clue how I would build a mass storage for example, or a video card. Suddenly I came across the RPi Pico and realised how revolutionary its PIO is. After playing a little bit with the PIO, I thought that it would be possible to use it like I did in this video.
      To be honest - I usually try to plan a few steps ahead and sometimes even test my ideas on a side (like the video card, which I already have a working proof-of-concept), but in this case I started rushing the new PCB without checking this idea of the Pico talking to the 80188. Only after soldering everything on the PCB, was I able to test it and initially I got a little bit scared. My initial version of the PIO programme (which only was writing to the Pico) already exceeded the available 32 instructions. Finally, after several hours over a few days, I managed to optimise the code to the point you saw it in this video.
      To summarise: I'm not planning to write any design as my only requirement for all of this is to have fun ;-) It's fun not having a customer with strict requirements, boring paperwork taking an hour for a one-line code change, etc. It's a hobby project and I would like to keep it this way, leaving all the "exciting" full life-cycle procedures to my daily work.
      I hope that answers your question - if not, please do not hesitate to reiterate it.

    • @BLSrr
      @BLSrr Год назад

      @@SladorSoft This answers my question more than expected, I like your approach. I have the same approach but sometimes I make some documentation, as of last week when I read my code back and had to look it over again for being to smart when writing it 🙂.

  • @juffma
    @juffma Год назад

    Will there be an explanation on how to solve the issue with only 256k of ram beig usable? (you said it on the last computer video in the comments) I would find that very interesting

    • @SladorSoft
      @SladorSoft  Год назад +1

      @Juff-Ma - yes you're right - I missed to explicitly explain that. The limit affected only the first version of the 80188 computer on breadboards, because I used the LCS pin for simplicity. On the PCB I decode access to the lower half-meg of memory using the S2 and A19 signals - similarly to the original 8088 contraption. Sorry for missing that explanation

    • @juffma
      @juffma Год назад

      @@SladorSoft OK thanks

  • @freddyvretrozone2849
    @freddyvretrozone2849 Год назад

    Cool, somebody else playing with the Pico on x86.
    What decided you to plug the Pico on a custom Board rather than using it on a stadard ISA ?

    • @SladorSoft
      @SladorSoft  Год назад

      The whole series is about creating a simple, custom 80188 computer using easily available chips. I had no inclination to replicate ISA at all, because any ISA cards are very rare these days and - even if you are able to buy one - they are very pricey. So I simplified my design and decided to use the Pico as a multi purpose controller in my computer instead.

    • @freddyvretrozone2849
      @freddyvretrozone2849 Год назад

      @@SladorSoft Yes I saw after, I started with this video

  • @robsocx
    @robsocx Год назад

    hey, the 80c188xl processor has outputs called cs, their PCS0/PSC4, do you know how to configure the processor to handle these ports, do you have any ready examples?

    • @SladorSoft
      @SladorSoft  Год назад

      Hi there!
      You can't configure each of the PCSx lines independently using the PACS register. You can set the base address for all of them and each line in order is activated for the next consecutive 128 addresses. If you setup the base address for, let's say 0x1000, the PCS0 will be active for any I/O addresses between 0x1000 and 0x107F, PCS1 for 0x1080 to 0x10FF, PCS2 for 0x1100 to 0x117F and so on.
      Please have a look at my "Slador188" repo on GitHub. At the top of the "init.asm" file there is the initialisation code which, among other things, configures the base address for PCS pins (currently line 39).

    • @robsocx
      @robsocx Год назад

      @@SladorSoft thanks a lot!!! , now I understand how it is configured, the datasheet does not exactly describe the configuration model, and I will ask what environment did you use to write the program? which supports all 80c188xl instructions, thanks again for your help!!

    • @SladorSoft
      @SladorSoft  Год назад

      In the next couple of days I'm going to release a short video describing all my programming environment set up step by step.

  • @nelsonamador5412
    @nelsonamador5412 Год назад

    Do you have an 8259 interrupt controller emulator with pico?

    • @SladorSoft
      @SladorSoft  Год назад

      @Nelson Amador no, I decided to keep things simple and use the built-in interrupt controller in 80188, which is not compatible with the 8259, but does its job. I mentioned it a few times that I prefer simplicity and availability of the components I use over compatibility of the computer with the original IBM PC. I will try though to keep some similarities at the BIOS level, which I plan to discuss a little bit in the next video.

    • @nelsonamador5412
      @nelsonamador5412 Год назад

      @@SladorSoft I agree with you but sometimes these devices are not available on our regions

  • @MichaelKingsfordGray
    @MichaelKingsfordGray 9 месяцев назад

    Why bother?
    The Pico can emulate the whole thing.

    • @SladorSoft
      @SladorSoft  9 месяцев назад +3

      "I can listen to music from a CD, so why bother going to a live gig?" or, "I can exercise at the gym, so why bother going to the mountains to hike?"
      All of these questions have common answers: to have fun, to develop your hobby, to get more experience, to show others that it can be done.
      But - in the case of using the real CPU, the most important answers are: to show how x86 works, what are its signals, capabilities, how to programme it, etc.
      I'd ask a counter-question in attempt to answer yours. How would you show in a piece of software how the CPU addresses the memory for example? Where would you put your LEDs to show the logic states of the address lines? Or how the CPU fetches its instruction and how do they look like in the binary code? How to raise an interrupt and how the CPU handles it?
      I hope I answered your question, even if not the way you might expect.