2021-08-15.log

chartreuseWell I just realized a mistake I made looking at the keyboard controller. The keys are being driven with a low row signal, and there's a pullup on the columns00:24
chartreuseRather than the other way around, so I'd need an interrupt on PC6 (COL14) rather than ROW1, And PC6 doesn't have pin change interrupt capabilities00:24
chartreuseAnd there's no pull down on the lines or in the AVR AFAIK00:26
chartreuseSo I can't just run it backwards00:26
chartreuseHmm00:26
chartreuseNeed to find a solution that'd work for people without requiring any hardware mods00:28
mntmnchartreuse: would a watchdog timer solution work? wake up once in a while and scan the row/column?00:29
chartreuseYeah I can probably do that, just means it's using more power on average than a full power-down until the key is pressed00:30
chartreuseThere are other keys that could be pressed as well, but the circle is on one that wouldn't work. Col 5-8 can do it00:31
chartreuseI'll see what the duration of the watchdog can be. It wouldn't need to wake for long, just wakeup and check the state of the PC6 pin to see if circle has pressed, and if not go back to sleep00:33
mntmnhmm is see00:33
chartreuseIs something like escape or the Super key on any of those columns that could make sense to wake it? Or would it be too confusing if it wasn't circle00:34
mntmnthe columns are mostly like you see them in front of you on the keyboard00:34
mntmnbtw you can check that easily in the pcb layout file00:34
chartreuseAh okay00:35
chartreuseThat makes sense given that there's 14 keys on the top row, I should have thought of that00:35
chartreuseOnly one I could see making sense is pressing spacebar to wake, but I think I'll look into the occasional wakeup instead00:36
chartreuseJust anything to save the continuous draw when off00:36
mntmnleft space is col4, right space col700:36
mntmnso only right space would work00:36
chartreuseAh yeah, I'll just pass on the other key idea then00:36
chartreuseNever used the watchdog on an AVR before so this is something new to learn00:37
mntmnsame00:37
mntmnthe key stuff is still interesting as an option for people who know what they're doing00:37
chartreuseThe watchdog just means though that I need to take over after the processor is reset, as all it does is send a reset signal after it expires00:38
chartreuseAdding a pull-down to ROW1 would make it easy to detect the circle key, since the matrix can be run the other direction while in standby00:38
chartreusePut power on COL14 and read it on ROW1, rather than making ROW1 low and the pull-up on COL14 being brought down00:39
chartreuseJust having the watchdog enabled increases the power draw in Power-Down mode, so that doesn't seem ideal. Though I'm not really seeing another way at the moment00:43
chartreuseCould rely on floating pins but that seems hacky. Drive ROW1 low then change to input before going into poweroff, and wakeup if it goes high00:44
chartreuseI'll think about this for a while, and also see just how long the watchdog can be set to00:45
chartreuseOh! Seems the watchdog can wake and do an interrupt instead of reset. That's easier00:48
chartreuseAnd the slowest it can run is every 8s, which is probably a little long to have the user hold the circle key for, but not terrible 00:49
chartreuseMaybe set it to 1s in normal power-off, and if the low battery condition is present then set it to 8?00:49
mntmnyep01:11
mntmnthat sounds reasonable01:11
- wagga (QUIT: Ping timeout: 246 seconds) (~wagga@node-1w7jra22ildhwz3bljfcm28nt.ipv6.telus.net)02:17
- V (QUIT: Remote host closed the connection) (~v@anomalous.eu)03:20
+ V (~v@anomalous.eu)03:33
chartreuseWhen the system shuts down to low battery does the LPC send anything to the keyboard controller? Or is that just ignored. I'm not immediately spotting anything06:00
chartreuseI can tell when the battery is low but doesn't seem that I can tell when the processor is off. USB power maybe?06:02
swivel'06:06
swiveloops06:06
mntmnchartreuse: i should probably add a power status flag in the battery status info that the keyboard gets from lpc. 10:21
+ lastebil_ (truck@77.246.204.69)12:42
- lastebil (QUIT: Ping timeout: 268 seconds) (truck@77.246.204.69)12:43
+ Guest20 (~Guest20@node-1w7jra22ildhv0sg95rztly40.ipv6.telus.net)13:33
+ reform22343 (~root@h26.43.17.98.static.ip.windstream.net)15:49
- reform22343 (QUIT: Client Quit) (~root@h26.43.17.98.static.ip.windstream.net)15:49
+ rasmus (~rasmus@c80-217-132-63.bredband.tele2.se)16:10
+ mjw (~mark@herd.wildebeest.org)18:06
- rasmus (PART: Disconnected: timeout during receiving) (~rasmus@c80-217-132-63.bredband.tele2.se)18:10
+ rasmus (~rasmus@c80-217-132-63.bredband.tele2.se)18:11
- S0rin (QUIT: Ping timeout: 245 seconds) (~S0rin@user/s0rin)18:33
+ S0rin (~S0rin@user/s0rin)18:35
* Guest20 -> wagga18:37
- rasmus (PART: Disconnected: timeout during receiving) (~rasmus@c80-217-132-63.bredband.tele2.se)20:11
+ rasmus (~rasmus@c80-217-132-63.bredband.tele2.se)20:12
- XgF (QUIT: Remote host closed the connection) (~quassel@2001:19f0:5001:1174:dbf:47a1:9a3f:787d)21:20
+ XgF (~quassel@2001:19f0:5001:1174:7863:4748:9423:56b5)21:21
+ bluerise_ (~bluerise@p5b0acbf2.dip0.t-ipconnect.de)21:22
- bluerise (QUIT: Ping timeout: 245 seconds) (~bluerise@user/bluerise)21:22
- rasmus (PART: Disconnected: closed) (~rasmus@c80-217-132-63.bredband.tele2.se)21:55
chartreusemntmn, that could be a nice idea. I'd probably modify the keyboard firmware to poll the battery info, or status, every so often in the main loop (like the low battery indicator). If it gets told that power is off then it goes to the power-save state22:03
chartreuseI think I've got the method currently written up, for now I'll add a test menu entry for it and then open up my bezel to get at the program button22:04
chartreuseBenefit of polling the battery in the main loop is I could have it update the battery display if that's left open. Which would be a nice feature by itself22:04
+ ephase (~ephase@2a01:e0a:168:1211::885)22:35
- wagga (QUIT: Quit: Client closed) (~Guest20@node-1w7jra22ildhv0sg95rztly40.ipv6.telus.net)22:54
* bluerise_ -> bluerise22:56
- bluerise (QUIT: Changing host) (~bluerise@p5b0acbf2.dip0.t-ipconnect.de)22:56
+ bluerise (~bluerise@user/bluerise)22:56
+ erlehmann (~erle@dynamic-046-114-036-228.46.114.pool.telefonica.de)23:58

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!