#garfield Logs
Dec 11 2021
#garfield Calendar
03:21 AM rue_shop3: I did it!
03:29 AM rue_shop3: the 555 transmitts 230kbaud serial data of 0-9 depending on the pot
04:21 AM Tom_L: cool
04:22 AM rue_mohr: trying to clean some timing tho
04:22 AM rue_mohr: there are edge cases that cause partial start bits
09:34 AM aandrew: rue_mohr: hm?
01:11 PM rue_mohr: https://hackaday.io/project/183026/details/
01:11 PM rue_mohr: this making any sense?
01:28 PM WormFood: rue_mohr, it makes sense to me.
01:29 PM WormFood: They're creating a state machine with a (EP)ROM. Kinda cool, but not really special in my book.
01:29 PM rue_mohr: right, to transmitt the value of a 555 via serial :)
01:29 PM rue_mohr: dont see enough hardware state machines
01:31 PM polprog: Reminds me of the one i wanted to make
01:31 PM WormFood: ROMs are extremely useful for a wide range of things. Eons ago, I found a schematic for a POST card, but it needed a funky 8 input AND gate, and a pair of insanely expensive 4-bit to 7-seg (hex) decoder. So, I ganged up several normal AND gates, to make an 8-input AND gate, and programed a 2708 EPROM to be the 7-seg decoder
01:31 PM WormFood: rue_mohr, the "hardware" is in the ROM
01:32 PM polprog: smart
01:32 PM polprog: Those must have been fun times
01:32 PM polprog: A POST card would probably be my first FPGA pcie project
01:32 PM rue_mohr: I used CPLD to author the rom contents
01:33 PM WormFood: I have several tubes of old 2708 and 2716 and 25xx....stuff I'll never use under normal circumstances. So I figured I can "waste" it on this POST card
01:33 PM WormFood: it's fun to understand how it works, and how to adapt what you have to suit your needs
01:33 PM rue_mohr: its too bad 2708 need so many voltages
01:33 PM WormFood: that is actually why I wrote my avr "baud" rate calculator.
01:34 PM rue_mohr: what did you use to create the image forit?
01:34 PM WormFood: I did it manually.
01:34 PM rue_mohr: debug?
01:34 PM WormFood: Well, the only eprom programmer I owned back then, was for my Tandy Color Computer, so I probably just typed it in there.
01:35 PM rue_mohr: oh
01:35 PM polprog: should not be too hard for a 7 seg driver eprom
01:35 PM WormFood: it was trivial
01:35 PM rue_mohr: http://paste.debian.net/1223050/
01:35 PM WormFood: I don't think I even wrote anything down. I just did it in my head. Made one mistake 1st time around, 2nd was perfect.
01:36 PM rue_mohr: coding that serial adc was an adventure
01:36 PM rue_mohr: I have to build some hardware just to do the 2716 roms the minipro wont do it
01:37 PM rue_mohr: I wish they had more terms in the GALs
01:37 PM rue_mohr: I'm all shy about using them cause I often want a lookup array and never know if it'll fit
01:40 PM rue_mohr: I was amused how often waveform playback came up with FPGA stuff
01:53 PM WormFood: rue_mohr, I can show you another way to reverse the bits in a byte --> unsigned char b; b = (b * 0x0202020202ULL & 0x010884422010ULL) % 1023;
01:54 PM WormFood: That's using the black magic method to reverse bits
01:55 PM rue_mohr: oo
01:55 PM WormFood: sadly, it requires 64-bits, so not suitable for an AVR, but there are other methods that work with the AVR
01:55 PM rue_mohr: that multiply is kinda expensive
01:55 PM WormFood: https://graphics.stanford.edu/~seander/bithacks.html#BitReverseObvious <-- take a peek at this
01:55 PM rue_mohr: oo more bithacks!
01:55 PM WormFood: There is some absolutely brilliant stuff in there.
01:56 PM WormFood: and inverting the bits is the easiest.
01:56 PM WormFood: xor is a wonderful tool.
01:56 PM rue_mohr: I had a time with it when doing FFT stuff
01:57 PM rue_mohr: as FFT does reverse bianry counting
01:57 PM WormFood: I have a program that needs to bit invert, and bit swap....so, I just made a lookup table.
01:57 PM rue_mohr: it was a "wow, modern cpu arch does NOT provide well for this!"
01:57 PM WormFood: what is "reverse binary counting"?
01:57 PM rue_mohr: 000
01:57 PM rue_mohr: 100
01:57 PM rue_mohr: 010
01:57 PM rue_mohr: 110
01:58 PM WormFood: 明白
01:58 PM WormFood: I understand
01:58 PM WormFood: doing that in hardware is trivial
01:58 PM rue_mohr: I was building lookup tabes for the fft
01:58 PM WormFood: that is probably the fastest way
01:58 PM rue_mohr: so that I could load the values into the array already butterfly swapped
01:59 PM rue_mohr: which means no pre-nonsense before doing the fft
01:59 PM WormFood: that is why I did it. I had the space to spare, and it saves cycles...not that I cared about that...I just thought it was a more elegant solution
02:00 PM rue_mohr: my fft code ran awesome on the avr
02:00 PM rue_mohr: I went 8 bit on the test of my code
02:00 PM rue_mohr: there are *just* enough bits
02:00 PM rue_mohr: you end up with 3 significant bits
02:00 PM WormFood: and a long time ago, I learned how to unfuck intel swapped bytes....this works on the 68000, and probably other platforms. I just push 2 bytes on the stack, and pop off a word...*poof* bytes swapped
02:01 PM rue_mohr: heh, nice
02:02 PM rue_mohr: I had a hell of a time working out how to get that serial to work without creating corrupt start bits
02:02 PM rue_mohr: I had to splat out the tests
02:05 PM rue_mohr: I like the hybrid analog-digital thing
02:06 PM rue_mohr: using a 555 to 'time off' a serial character is kind neat
02:07 PM rue_mohr: I should work out an LC osc to get the 921.6kHz oscillator to get 115200 baud
02:07 PM rue_mohr: then I'd have to re-work the 555 RC tho
02:32 PM Tom_L: channels seem to be waking up of late
02:35 PM rue_mohr: I'v noticed a bit of life
02:36 PM Tom_L: they're going nuts to get linuxcnc in mainstream
02:36 PM rue_mohr: ah
02:36 PM Tom_L: docs are being automated and translated into several languages
02:37 PM Tom_L: heard of weblate?
02:37 PM rue_mohr: no
02:42 PM Tom_L: couple of the devian developers are involved
02:42 PM Tom_L: debian
02:49 PM rue_mohr: its hard to find those
04:24 PM Tom_L: french, german, russian, i dunno how many they're doing
11:52 PM rue_mohr: company party was dialed back quite a bit, great food tho