Battery info is part of the data recieved from the AVR as explained on p.20 in Lego Mindstorms NXT (TM) Hardware Developers Kit
Battery word contains the
- voltage (mV) = bits 0-9 * 13.848
- not supporting float so multiply by 1024 * 13.848= 14180 then divide by 1024
- alternative: would be to just use relative power of 0-1023
- accu pack inserted bit (bool) bit 15
- The accu pack has peg-like tab that pushes battery setting, when its inserted.
- avr firmware major.minor version (xx.yyy) bits 13-14 major; bits 10-12 minor
- AVR firmware version will be given its own FB if its ever needed.
Interesting lms Battery links:
Battery discussion in thenxtstep blog
Interesting study of NXT battery power levels:
No comments:
Post a Comment