Welcome, Guest. Please login or register.


Author Topic: ESP8266 (Read 15379 times)

Offline BruceTanner

  • EP lover
  • *
  • Posts: 609
  • Country: gb
ESP8266
« on: 2017.March.25. 19:46:41 »
Somebody has got a Z80 emulator running on an ESP8266.

http://hackaday.com/2017/03/25/cpm-8266/

Now where could we go from here... :shock:
« Last Edit: 2017.March.26. 08:33:48 by BruceTanner »

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: ESP8266
« Reply #1 on: 2017.May.22. 14:09:48 »
On this thread of the Spanish web page Retrowiki, a guy has successfully connected several microcomputers to an ESP8266 WIFI module to try BBSs.

One of them is a BBC computer, connected through a RS423 serial port like the Enterprise has infra-utilised. 

I will try to do the same...

Offline BruceTanner

  • EP lover
  • *
  • Posts: 609
  • Country: gb
Re: ESP8266
« Reply #2 on: 2017.May.22. 15:50:38 »
I also have a little ESP8266 project going on...to replace the WIZ ethernet module on EPNET with a pin-compatible module with an ESP8266 and xilinx CPLD containing VHDL for a fast UART and/or a SPI driver :shock:

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: ESP8266
« Reply #3 on: 2017.May.22. 17:09:38 »
Just to note: I don't know details, but the ZX Spectrum Next project also seems like to use ESP8266, and it seems there is goal to write "Internet tools" as well. Among the "stretch goals" (the "dedicated developer"), but it seems the money is enough for that already and soon the 1 month of campaign is over:

https://www.kickstarter.com/projects/1835143999/zx-spectrum-next/

I just found that interesting, as they states the project will be open source, and even if it's a Spectrum project, it's still around the Z80.

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: ESP8266
« Reply #4 on: 2017.May.22. 21:37:43 »
The best for us is that the stock module comes with a firmware that emulates a modem, but it can be loaded with others, even a z80 emulator with CP/M...

There is an active Scene behind this module. Probably the Next will carry a modified firmware only for it.

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: ESP8266
« Reply #5 on: 2017.May.22. 21:56:36 »
The best for us is that the stock module comes with a firmware that emulates a modem, but it can be loaded with others, even a z80 emulator with CP/M...

There is an active Scene behind this module. Probably the Next will carry a modified firmware only for it.

I guess so, since somewhere I read that "reprogramming ESP8266 needs ..." or something like that. Anyway, it seems currently there is huge amount of project, code and doc on the module/chip itself, in contrast of its beginning when it was kinda a puzzle, especially to have only limited amount of info, and even that is in Chinese only ...

Offline BruceTanner

  • EP lover
  • *
  • Posts: 609
  • Country: gb
Re: ESP8266
« Reply #6 on: 2017.May.23. 11:50:03 »
I will try to do the same...

Don't forget it runs at 3.3V! :cry: :roll:

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: ESP8266
« Reply #7 on: 2017.May.23. 12:07:00 »
I know. I will use this circuit to feed the Wi-Fi module:

[ Guests cannot view attachments ]

[ Guests cannot view attachments ]

And this to rearrange the serial lines:



The first test made by "Gatuso" on the Spanish Retrowiki page has been done on a BBC micro, that also has a RS423 serial port:



Only that the BBC has -5v to +5v signals whereas the Enterprise returns -5v to +7v if the reference line is used.
« Last Edit: 2017.May.23. 22:41:00 by gflorez »

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: ESP8266
« Reply #8 on: 2017.May.30. 10:31:53 »
Last weekend I was testing the Wi-Fi module on the EP, but a lot of things where against me....

First, the ESP8266 module comes with a stock baud-rate setting of 115200, it first needs to be changed to 9600 on a capable computer, but on the other side, a good connection could return at least some garbage.

Second, on the BBC it worked to joint RTS with CTS to use software handshake, but not on the Enterprise. Reading the module documentation,  I found that hardware handshaking is still possible but not with this module, ESP8266-01, as it hasn't populated all the pins of the chip on the header connector. There are other reincarnations with more connectivity, like the ESP8266-12E:



To be able to use RTS and  CTS on the module, first an AT command has to be send to the module:



I think not all is lost with the ESP8266-01 I bought, I can solder two leads to the ESP8266EX pins, 12 and 13 on the module:



Now I have the little leads connected directly to the chip:



But I have to wait for a MAX3232 module to convert and invert the 3,3v TTL signals to the RS423 levels of the EP.

I have bought this that works on four lines.
« Last Edit: 2017.May.30. 10:38:58 by gflorez »

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: ESP8266
« Reply #9 on: 2017.June.06. 08:20:39 »
I was wondered even by my own (without too much thinking or even trying) if it was possible to upload a new firmware (after all now even Arduino's IDE supports ESP8266 ...) using GPIO for communications somehow on a parallel way, without the problematic nature of serial bus. I am not sure if it's free to re-use all pins labelled as GPIO, but if does, there should be 8 pins for data, and let's say some of them for "signal" functions like, data direction (R/W), request validation, and such. Still there should be some usual ICs (eg from the 74xx family) for address decoding and well, maybe a bi-directional buffer from the kind of these 74xx stuffs powered from 3.3V but 5V tolerant inputs (afaik there are such). I am really not sure how hard would it to be, for logical level shifting it's certainly more easy only with two lines (uart, tx/rx) but after all having a parallel interface would work the extra job.

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: ESP8266
« Reply #10 on: 2017.June.06. 10:46:54 »
Very good idea!

There are a few mandatory GPIOs on the module: 0 is to protect the program, 1 is TX and 3 is RX. They are needed to program the firmware by the strapboot.
 
On the ESP8266-01 there is only a spare GPIO,  number 2.

But on the ESP8266-12E module there are 14 spare GPIOs, number 2, and number 5 to 16.

I have read on the documentation that there is a SDK to add or modify the AT commands, so the source code is at hand.

As you say, a drawback are the 3.3v signals.

Bruce is working with one of these modules, but I think he is doing it serial.

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: ESP8266
« Reply #11 on: 2017.June.06. 11:05:50 »
Yes, at the beginning there was no information on ESP8266 virtually, and the only little was given in Chinese. But as recently it seems there is a strong community behind this chip, documentation and even the event to support from Arduino IDE, now - I guess - it's much more easy to use a custom firmware which can avoid using serial things then. It was not so much an option at the beginning though because of the "unknown" factor I described above, so most things were even about trying to figure out the AT-like command set as the whole, and not even counting custom firmwares. And btw, since it uses (a kinda powerful) MCU, it may be even possible to include features like FPU operations as an accelerator, even if the MCU does not have a real FPU, it would be way faster to do it in software on the MCU than a Z80 can do ...
« Last Edit: 2017.June.06. 13:03:55 by lgb »

Offline BruceTanner

  • EP lover
  • *
  • Posts: 609
  • Country: gb
Re: ESP8266
« Reply #12 on: 2017.June.06. 12:10:43 »
Bruce is working with one of these modules, but I think he is doing it serial.

Yes I am working on a ESP8266-based module that will replace the WIZ network module on EPNET which already has 3.3v, RAM, ROM and memory/I/O decoding. :) I am using a xilinx CPLD to interface the z80 to the ESP as that is a 3.3v device with 5v compatible I/O like the WIZ module. I have written a UART in VHDL so I can talk to the ESP initially in its "native" way although SPI might also be a possibility once I get more experience with the ESP. But then so might just an even faster UART.

Work on this has been interrupted by the arrival of a new batch of EPNET 1.2 PCBs from China, which are looking good so far, I've just got the new Compact Flash IDE interface going and everything else seems to be working.

My dilema will then be whether to let some EPNETs out of the door with WIZ software in which I will have to support forever, or whether to incur a further delay to EPNET while I do the ESP module. :roll:

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: ESP8266
« Reply #13 on: 2017.June.06. 14:08:38 »
Yes I am working on a ESP8266-based module that will replace the WIZ network module on EPNET which already has 3.3v, RAM, ROM and memory/I/O decoding. :) I am using a xilinx CPLD to interface the z80 to the ESP as that is a 3.3v device with 5v compatible I/O like the WIZ module. I have written a UART in VHDL so I can talk to the ESP initially in its "native" way although SPI might also be a possibility once I get more experience with the ESP. But then so might just an even faster UART.

One thing, that this custom-firmware-parallel "hack" sounds nice, it's possible that it's not easy to do. The reason, that whatever fast the module's embedded MCU is, maybe it's not fast enough (in term of software of its firmware) to react on Z80 bus signalling in the given time constraints. So it's possible that UART works because it's slower and maybe the chip even has a FIFO inside for it, thus there is not so much an issue. For SPI, I don't know again ... SPI still would be better than the usual "uart-serial", that is you don't need to have a strict "speed" since it's done with the SPI clock line, so you are more free to do anything. But even here it's a question that it can be done sane way ie with custom firmware, and what is the requirement that SPI slave/master capability (ie who owns the clock generation for the data). Of course parallel would be the best, but see above ... But after all, at the other hand: if some want use a CPLD and eg address decoding / glue logic can be done (instead of discrete logic), of course it's not so much a problem to implement a very simple UART/SPI/whatever like entity there as well for interfacing with Z80 bus.

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: ESP8266
« Reply #14 on: 2017.June.06. 16:06:20 »
Work on this has been interrupted by the arrival of a new batch of EPNET 1.2 PCBs from China, which are looking good so far...

Have you managed to fix the annoying electronic noise problems?

My dilema will then be whether to let some EPNETs out of the door with WIZ software in which I will have to support forever, or whether to incur a further delay to EPNET while I do the ESP module. :roll:

The WIZ will have immediate compatibility with EXOS, and later with SymbOS. You already have a finished product.

The ESP8266 can have other uses, as pointed by LGB. The Wifi modules have a big amount of extra memory and can be re-flashed with more options that only Internet connection. Imo, better you provide the card, then you and others would add more options.