Giter VIP home page Giter VIP logo

Comments (12)

mickeprag avatar mickeprag commented on September 10, 2024 1

This sounds cool. I am on. Although I have almost zero experience from wokwi...

from epdiy.

martinberlin avatar martinberlin commented on September 10, 2024

This sounds cool. I am on. Although I have almost zero experience from wokwi...

Thanks for your interest. Same here. I'm still figuring out the very basics. For example here I don't have any idea why IO8 does not turn HIGH. Note I'm lazy to put a resistor to each LED but is not that for sure!
UPDATE: Fixed. The thing is that the pin labels is a bit confusing. But now is working:
https://wokwi.com/projects/401153784260252673

from epdiy.

mickeprag avatar mickeprag commented on September 10, 2024

Maybe because IO8 is internally connected to the flash?

from epdiy.

martinberlin avatar martinberlin commented on September 10, 2024

Ok it was me that I was connecting the wrong pins. The problem with most computer related thing is ourselves except on some rare moments ;)
https://wokwi.com/projects/401153784260252673 -> And next blocker is... that I can't seem to tell the Simulator that the MCU has external RAM. Why I don't know, I'm adding the attribute:

{ "type": "board-esp32-s3-devkitc-1", "id": "esp", "top": -0.18, "left": -5.03, 
    "attrs": { "psramSize": "8", "flashSize": "4" }

blocker is now an Issue pending to be resolved wokwi/wokwi-features#809

from epdiy.

martinberlin avatar martinberlin commented on September 10, 2024

Blocker solved thanks to a hint of Wokwi team:

{
    "type": "board-esp32-s3-devkitc-1",
    "id": "esp",
    "top": -0.18,
    "left": -5.03,
    "attrs": {
        "psramSize": "16",
        "flashSize": "4"
    }
}

@vroland and @mickeprag PSRAM is detected now. What remains is to make the 2 mentioned custom chips otherwise the firmware will hang without being able to communicate with the IO expander or the TI Power mic.
As an inspiration and demo source here is a demo using PCF8575 an IO expander that is very similar of v7 PCA9535 and we could use as a base (Not exactly the same but can work adapting it) From TI forum:

The PCF8575 and PCF8575C are not as closely related to these aforementioned two parts. There are multiple feature differences, most notably that the the PCF devices do not implement configuration registers. Also, the TCA9539 and TCA9539-Q1 have reset pin functionality while the PCFs do not.

Started to add this here experimentally: https://wokwi.com/projects/401153784260252673

from epdiy.

martinberlin avatar martinberlin commented on September 10, 2024

Implemented first time custom chip and it seems the CI action works however I still fail to link it on VSCode diagram.json
https://github.com/martinberlin/wokwi-pca9535

from epdiy.

martinberlin avatar martinberlin commented on September 10, 2024

@vroland I will need the behaviour of "simulated chip" PCA9535 to be reviewed. What I'm getting in the VSCode console only placing this chip with the pins connected as in v7 Schematic is this:

[chip-pca9535] Input mask is now 0xc007
[chip-pca9535] Input mask is now 0x3
[chip-pca9535] Input mask is now 0x2103
[chip-pca9535] Input mask is now 0x2903
[chip-pca9535] Input mask is now 0x3903
[chip-pca9535] Read: reset INT flag

Custom chips are not really easy to use. The fastest way that I've found is to make a repository, add some CI, so it get's compiled (output is Web assembly or WASM), and that's how it's loaded into Wokwi. It's a bit of black magic for me, a bit hard to understand, the internals of how all this works together. Hence I need a bit of a review and some help making custom chip TPS65185. On that topic if I understand that right:

To simulate the power Mic I just need to hear on 0x68 address. And when it get's the TPS_REG_ENABLE I2C signal activates the voltages, pulling TPS_PWR_GOOD low. Is that correct?

Test of IO expander custom chip seems to work but left part looks like a Christmas tree and I've no idea why.

from epdiy.

martinberlin avatar martinberlin commented on September 10, 2024

Advancing very slowly here. In the next days I'm adding the wokwi-tps65185 custom chip.
What it will do really is just to receive the signal to power up the grid and just turn hi a GPIO. It won't really generate any voltages since wokwi does not know anything about volts ;)

from epdiy.

vroland avatar vroland commented on September 10, 2024

No problem, things are slow during the summer ;) Curious where this goes.

from epdiy.

martinberlin avatar martinberlin commented on September 10, 2024

Finished to add new chip:
https://wokwi.com/projects/401153784260252673

Chip itself is in this repository: https://github.com/martinberlin/wokwi-tps65185/
This is just a small wrapper to "emulate" a reply with PWR_GOOD signal since Wokwi does not know about voltages for Eink 🔌
Let's see if I can test it in the next days. Would be cool if someone helps to verify if all connections / signals match the schematic.

UPDATE:
Today I finish writing a full epdiy example with chips and what-not included, but the compiling time is a bit long. Second glass of wine and still building...
Wokwi compiling...

from epdiy.

vroland avatar vroland commented on September 10, 2024

Sounds promising! Did it compile in the end?

from epdiy.

martinberlin avatar martinberlin commented on September 10, 2024

No. There must be something in my tps65185 chip that does not like. But I must say that at this point is a bit weird because it can take forever, instead of prompting some kind of useful error message.
My first thoughts where "Ok this is great to make simple simulations" but when going deeper then unexpected things happen, without proper guidance to the developer trying to implement it. Hopefully I'm wrong and it just deserves some more rounds of fight. But I guess you understand what I'm trying to say.

from epdiy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.