*** tpb has joined #upy-fpga | 00:00 | |
mithro | katharos: sooo, that code :-P I'm really interested to see the solution you ended up using | 00:49 |
---|---|---|
*** stewart has joined #upy-fpga | 01:09 | |
mithro | Hi stewart! | 01:12 |
mithro | stewart: I see your MimasV2 turned up and you got J-Core running on it? | 01:13 |
stewart | mithro: I did! | 01:19 |
stewart | mithro: and i did so while having an epic cold/flu | 01:19 |
stewart | using a serial port was.... hard | 01:19 |
stewart | (which is something I do every day :) | 01:19 |
mithro | Yeah - in your notes you where using 115200? However I was pretty sure the PIC UART was hard coded to something like 19200? | 01:22 |
stewart | mithro: yeah... that's what they said on j-core.org at least... and it did work | 01:25 |
mithro | stewart: interesting... | 01:29 |
mithro | shenki / katharos: Do you want to see if you can get the uart working at 115200? It would be good to speed up serial firmware downloads :-P | 01:29 |
stewart | mithro: I should probably submit a patch to systemd/udev to add it to the list of boards that shouldn't be probed by ModemMangler | 01:31 |
mithro | stewart: Should probably blacklist everything by Numato - they don't make modems | 01:31 |
mithro | stewart: Our udev rule is at https://github.com/timvideos/HDMI2USB-mode-switch/blob/master/udev/99-mimasv2-blacklist.rules | 01:32 |
tpb | Title: HDMI2USB-mode-switch/99-mimasv2-blacklist.rules at master · timvideos/HDMI2USB-mode-switch · GitHub (at github.com) | 01:32 |
mithro | Looks like micropython has a framebuffer module - https://github.com/micropython/micropython/blob/master/extmod/modframebuf.c | 01:57 |
tpb | Title: micropython/modframebuf.c at master · micropython/micropython · GitHub (at github.com) | 01:57 |
katharos | mithro: Lemme get the easy thing working before I try the hard thing. Also seven seg displays are fun. | 02:22 |
katharos | I'll send you the code later tonight | 02:22 |
katharos | I'll send a pull request once I've cleaned it up a bit and moved it to a separate module. | 02:24 |
mithro | Oh, I was happy to look at the half finished stuff | 02:26 |
mithro | (IE just push to github and link me would be fine) | 02:26 |
katharos | https://www.irccloud.com/pastebin/dYdnvCld/ | 02:29 |
tpb | Title: Snippet | IRCCloud (at www.irccloud.com) | 02:29 |
katharos | That's pretty much it. Keen to hear ways to make it cleaner or less verbose | 02:29 |
katharos | or better. | 02:30 |
katharos | For example, it uses 2 bits to select one of the 3 sevenseg displays so it goes blank 1/4 of the time which shouldn't be necessary | 02:30 |
katharos | There's also a tiny amount of ghosting - i.e. segments showing up faintly on the wrong display | 02:31 |
*** upy-fpga-bridge has quit IRC | 03:15 | |
mithro | katharos: You should be able to just go If(selector == 0, xxx).ElIf(selector == 1, xxx).Elif(selector == 2, xxx) | 03:23 |
mithro | katharos: You could also use a binary decoder (there is an built in one, but it might be worth writing your own to give it a go) to do the number -> individual pin conversion bit | 03:26 |
katharos | Ah I didn't know you could use binary operators in the ifs | 03:27 |
mithro | katharos: Otherwise, looks very similar to how I think Jim and myself did it | 03:27 |
mithro | katharos: The stuff you can use is pretty limited, but things like number equality works IIRC | 03:28 |
mithro | katharos: I think the fact you have to individually assign each of the segment parts means we probably should change the way the segments are defined in the platform file | 03:30 |
mithro | It's be nice to do sevenseg.segment.digits.eq(segvalue[selector][0]) - or something like that | 03:30 |
katharos | Yeah, that seemed like a limitation in the sevenseg definition | 03:31 |
mithro | You should poke jimbo to join this IRC channel and to dig up the stuff we did on his board | 03:32 |
mithro | katharos: You can refactor this to use a python loop to do deal with arbitrary number of segments - see the cas.py file for something along those lines | 03:34 |
mithro | Which is one of the nice things about migen/litex stuff | 03:35 |
katharos | ah yeah, I didn't think of that. I'd still have to put all the segment pin names into a list, but that'd be cleaner | 03:35 |
mithro | katharos: But really great to see you making progress | 03:36 |
mithro | katharos: Don't be afraid to modify the platform or other files either, there is probably a whole lot which doesn't make that much sense :-) | 03:37 |
katharos | Hehe, if it doesn't make sense to me I'm unlikely to want to modify it | 03:38 |
*** upy-fpga-bridge has joined #upy-fpga | 05:07 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!