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

single timer version #11

Open
tomaskovacik opened this issue Aug 29, 2019 · 0 comments
Open

single timer version #11

tomaskovacik opened this issue Aug 29, 2019 · 0 comments
Assignees

Comments

@tomaskovacik
Copy link
Owner

tomaskovacik commented Aug 29, 2019

Use timer probably 8bit one is fine, to tick and just increment variables

Based on dataout pin level set dataoutPinLevel to 1 or 0 , in timer isr based on value of this var increment dataoutHighCount or dataoutLowCount variables.

Increment count variable for 50ms flag (seconds ticking)

Increment variable for counting between bytes or between packets

Also will be nice if sending out bits will be timed by this counter, so 50us is probably best, bit timing is currently 40us so 50us is fine, clk value should be stored in a variable( or we can read port bit, no?) And if we each tick simply invert it we have clock, then when this is low we can set dataline and leave timer isr, if next time timer isr is fired and we flip clock pin bit value ( so level) and it is high we simply did not change dataline pin bit value and leave isr.

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

No branches or pull requests

1 participant