-
Notifications
You must be signed in to change notification settings - Fork 3
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
Smoke test in proteus #2
Comments
Привет. Вы из России, поэтому отвечаю на русском. |
Адреса разные, но шлю в broadcast. |
Подскажите, для atmega328p, timer2, правильные настройки? // Timer initialization in NORMAL MODE
#define CLUNET_TIMER_INIT { TCCR2B = (1 << CS22); }
// Timer prescaler (for autocalculate T period)
#define CLUNET_TIMER_PRESCALER 64
// Main Register
#define CLUNET_TIMER_REG TCNT2
// Output Compare Register
#define CLUNET_TIMER_REG_OCR OCR2A
// Overflow Condition (used in bootloader only)
#define CLUNET_TIMER_OVERFLOW (TIFR2 & (1 << TOV2))
// Reset Overflow Flag Command (used in bootloader only)
#define CLUNET_TIMER_OVERFLOW_CLEAR { TIFR2 = (1 << TOV2); }
// Reset Output Compare Flag Command
#define CLUNET_CLEAR_OCF { TIFR2 = (1 << OCF2A); }
// Enable timer compare interrupt (reset output compare flag & enable interrupt)
#define CLUNET_ENABLE_OCI { TIMSK2 |= (1 << OCIE2A); }
// Disable timer compare interrupt
#define CLUNET_DISABLE_OCI { TIMSK2 &= ~(1 << OCIE2A); }
#define CLUNET_INT_ENABLE() { EIFR = (1 << INTF0); EIMSK |= (1 << INT0); }
#define CLUNET_INT_DISABLE() { EIMSK &= ~(1 << INT0); }
#define CLUNET_INT_INIT() { EICRA |= (1 << ISC00); EICRA &= ~(1 << ISC01); CLUNET_INT_ENABLE(); } |
Удалось добиться коммуникации. |
У меня 2.0 в протеусе не запустилась, хотя оригинальная версия прекрасно работает |
Hello!
I built two nodes:
and the same with the only diffs as: first delay 400ms, looping clunet_send to node 99, second delay 300.
Both
PD2
connected, pulled up to VCC.I see no activity on
PD5
used to flash on receipt -- https://gyazo.com/6a340ae6cee2ae8832ab2110c3a81e64Wonder what I do wrong?
TIA,
--Vladimir
The text was updated successfully, but these errors were encountered: