Skip to content
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

Issues with Arduino driver #2

Open
ZeeRooo opened this issue Jul 25, 2020 · 3 comments
Open

Issues with Arduino driver #2

ZeeRooo opened this issue Jul 25, 2020 · 3 comments

Comments

@ZeeRooo
Copy link

ZeeRooo commented Jul 25, 2020

I have been trying to stablish a communication between my pc and BC417 through my Arduino (which has a CH340) and i put some prints in the Arduino sketch but nothing is received, seems like the driver is not sending information to the Arduino because https://github.com/Frans-Willem/CsrSpiDrivers/blob/master/spilpt.arduino/CsrSpiDriver/CsrSpiDriver.ino#L32 is always empty.
First, just to make sure the driver IS working, i built the LPT fixed version and worked as expected in an old LPT compatible motherboard that i have lying around, so i decided to replace all LPT to COM, but i didn't work (again, nothing were send to the Arduino).
Last, reading the CH340 datasheet i saw that 256000bauds is not supported, so i changed to other speeds (like 115200) in both Arduino sketch and https://github.com/Frans-Willem/CsrSpiDrivers/blob/master/spilpt.arduino/CsrSpiDriver/CsrSpiDriver.ino#L32

I understand that it's an old project and also something finished for you, but can you point me out what to look? Thanks.

PS: I'm using Uno R3.

@hllhll
Copy link

hllhll commented Jul 27, 2020

Years ago, I've manage to use the BitBang version, I've changed the Baud rate of the DLL & the sketch to, .. I don't remember what .... and it still worked

Note - the Serial is not meant for interfacing the BCxxx! Rather it's the interface between the PC & Arduino

@ZeeRooo
Copy link
Author

ZeeRooo commented Jul 28, 2020

@hllhll What do you mean with your note? I'm not supposed to be able to use my Arduino as an ISP programmer for the BC?

@hllhll
Copy link

hllhll commented Jul 28, 2020

I'll rephrase my comment.
The Arduino acts as the middleman between the BCxxx and the PC; The arduino interacts with the chip via SPI (See setup https://github.com/Frans-Willem/CsrSpiDrivers/blob/master/spilpt.arduino/CsrSpiDriver/CsrSpiDriver.ino#L21 ) And interacts with the PC Using the arduino Serial port.

In your question you mentioned CH340 - I Thought it has to do with the BCxxx (but googling I see it's not, rather the communication with the PC, I Guess that's my mistake ^_^).

Anyway, if you change the speed on the .ino; You should also change it in the .DLL
For the regular sketch https://github.com/Frans-Willem/CsrSpiDrivers/blob/master/spilpt.arduino/basics.cpp#L131:
For bitbang: https://github.com/Frans-Willem/CsrSpiDrivers/blob/master/spilpt.arduino.bitbang/basics.cpp#L129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants