Skip to content

New Waveshare (b) devices use Different CH422G outputs #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bondango opened this issue Oct 4, 2024 · 5 comments · Fixed by #9
Closed

New Waveshare (b) devices use Different CH422G outputs #5

bondango opened this issue Oct 4, 2024 · 5 comments · Fixed by #9

Comments

@bondango
Copy link

bondango commented Oct 4, 2024

The new Waveshare revision (B) devices for example esp 4.3(b) use the 8 directional i/o's and also the General purpose Output Pins of the CH422G.
As per CH422G Datasheet :-
The pins OC3-OC0 of CH422 are push-pull or open-drain output pins, and are push-pull output pins by
default.

Waveshare schematic :-
1728054451643

Datasheet Layout:-
1728054329375

On the new revision boards OC0 and OC1 are used as digital Outputs to drive BC817-40's via PC817X3's

The current library has support for the 8 Directional I/Os but not the OCx Outputs.

Marty

Lzw655 added a commit that referenced this issue Oct 9, 2024
Lzw655 added a commit that referenced this issue Oct 9, 2024
@Lzw655
Copy link
Collaborator

Lzw655 commented Oct 9, 2024

Hi @bondango, sorry for the late. I tried modifying the driver according to the CH422G manual so that it can control the OCx (pin number: 8-11) output level. However, since I don't have the hardware, could you please help me test it? Thank you very much!

Lzw655 added a commit that referenced this issue Oct 9, 2024
@bondango
Copy link
Author

bondango commented Oct 9, 2024

Thank

Yes I will try and report hopefully this weekend

@bondango
Copy link
Author

I did try a simple 1 second pause loop

expander - digitalWrite(8, HIGH);
expander - digitalWrite(9, HIGH);
delay(500);
expander - digitalWrite(8, LOW);
expander - digitalWrite(9, LOW);
delay(500);

simple light test
power gnd >>>output GND
+12v >>> bulb
blub >>> DI0

But nothing on the DO0 and D01 outputs
inputs are working fine

@Lzw655
Copy link
Collaborator

Lzw655 commented Oct 14, 2024

Thank you for the testing! Could you please provide your complete code and the serial output logs? It would also be best if you could add expander->printStatus(); in the loop.

@bondango
Copy link
Author

the changes made by H-sw123 work fine my end

Lzw655 pushed a commit that referenced this issue Oct 18, 2024
@Lzw655 Lzw655 closed this as completed in #9 Oct 18, 2024
@Lzw655 Lzw655 closed this as completed in 2ca1b78 Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants