danny270793 / ArduinoShiftRegister

MIT License
0 stars 0 forks source link

Shifter doesn't work #1

Closed Gavin-Perry closed 3 weeks ago

Gavin-Perry commented 4 months ago

There are lots of shifter libraries out there but I wanted something really simple (only need one bit set at a time) so I chose yours. I'm running on a RasPi Pico using IDE 2.3.2 with Earle Philhower's Board Manager The example program doesn't work. I expanded it with some Serial.print statements to find the problem. As soon as shifter.digitalwrite(bit,state) is called the program halts. I've attached the source I used. Comment out the shifter lines (//1) and it runs (doing nothing useful) with those line it halts before the first loop finishes. .ino file renamed to .txt to upload, 2 UF2 files (with and without the shifter running) in the zip file shift595digitalwrite.ino.txt shift595digitalwrite.zip

danny270793 commented 4 months ago

Hello

Please, can you share me the error you have (the full output of the arduino ide) WhatsApp Image 2024-05-27 at 10 13 52

And how to configure your board in my environment to test what is happening WhatsApp Image 2024-05-27 at 10 14 21

Gavin-Perry commented 4 months ago

Do you have a Pico? I gave you the source code and the compiled images that you can run. Do you get the same behavior?

Sent via the Samsung Galaxy S22 5G, an AT&T 5G smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Danny @.> Sent: Monday, May 27, 2024 11:15:00 AM To: danny270793/ArduinoShiftRegister @.> Cc: Gavin Perry @.>; Author @.> Subject: Re: [danny270793/ArduinoShiftRegister] Shifter doesn't work (Issue #1)

Hello

Please, can you share me the error you have (the full output of the arduino ide) WhatsApp.Image.2024-05-27.at.10.13.52.jpeg (view on web)https://github.com/danny270793/ArduinoShiftRegister/assets/7507703/c73d01e2-7ff2-4f21-8e2d-ecbbb25fc4a8

And how to configure your board in my environment to test what is happening WhatsApp.Image.2024-05-27.at.10.14.21.jpeg (view on web)https://github.com/danny270793/ArduinoShiftRegister/assets/7507703/78c38f34-c772-43ce-bec6-06125adf12d4

— Reply to this email directly, view it on GitHubhttps://github.com/danny270793/ArduinoShiftRegister/issues/1#issuecomment-2133678030, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVR4PP7DU7YTHOOWAWORFTTZENEXJAVCNFSM6AAAAABIKMIUHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGY3TQMBTGA. You are receiving this because you authored the thread.Message ID: @.***>

danny270793 commented 4 months ago

Hello

No, I dont have one :c I'm trying to setup my environment as your to check why it fails (IDE, boards, etc), can you share how you setup you environment?

When I compile the library it works (for adruino UNO), may be is some invalid keyword with your board Can you also share me the link of the documentation of your board?

Gavin-Perry commented 4 months ago

There is no problem compiling. If you don't have a PICO to try it on you won't see the problem. Program runs until shifter.digitalWrite() is called then hangs. (I may have the capitalization wrong here, but it is correct in the program.)

Do you have any (assembler) code that is AVR or hardware specific? Removing the 2 calls to the shifter.... (//1 in the code) and the program runs fine. I tried changing pins but that isn't the problem. ShiftRegister74HC595 works fine so I can use that instead if you don't have resources to fix it. Gavin

danny270793 commented 4 months ago

Hello

So it compiles and generates a "binary" that you uploads to your shield and then fails, with the Serial.println you found that fails at shifter.digitalWrite() right? there is any logs of the execution?

The library depends on #include "Arduino.h" which may is not available in you microcontroller It just fills and array with the data image And then writes data out image Maybe shiftOut because is an arduino specific code

Gavin-Perry commented 3 weeks ago

Sorry not to get back to you. Turns out I had crossed wires to my second chip! All works fine now. Thanks!

danny270793 commented 3 weeks ago

Nice to hear that, let me know any other questions do you have :)