#avr Logs

May 24 2018

#avr Calendar

12:32 AM day__ is now known as day
01:05 AM polprog: \b([Gg]o+rplo+p)|([Pp]o+l(ish)?[Pp]ro+g(rammer)?) -regexp -color %k%3 -actcolor %Y
01:06 AM Thrashbarg: agreed
01:07 AM polprog: previuous one had \b at the end so stuff like "gorplops" didt work
03:24 AM nuxil: hmm.. does the strings used with progmem get its tailing spaces removed?
03:24 AM nuxil: const char TXT1[] PROGMEM = "Hi "; does this just becomes "Hi" without the 4 tailing spaces ?
03:24 AM nuxil: im asking cos im having some weird behavioure when using progmem.
03:25 AM nuxil: short example. https://pastebin.com/UKHTHCQU
03:27 AM nuxil: erm.. *3 tailing spaces.. not 4
03:29 AM Emil: nuxil: wot?
03:29 AM Emil: of course not
03:29 AM Emil: mate
03:30 AM Emil: this is not some fucking html :D
03:30 AM Emil: if you put something into progmem it is there
03:30 AM Emil: unless your part breaks
03:30 AM nuxil: lol yea. im scratching my head why it behaviouse as it does.
03:31 AM Emil: wtf
03:31 AM Emil: mate
03:31 AM Emil: read_word returns two bytes
03:31 AM Emil: what the heck do you think it does?
03:31 AM Emil: holyshitthatexamples
03:32 AM nuxil: you dont get it do you?
03:32 AM Emil: no I dont see the issue
03:33 AM nuxil: the last 3 spaces should replace the "ere" when hi gets printed again. but its like its missing the spaces.
03:33 AM Emil: _NO_
03:33 AM Emil: rtfm
03:33 AM nuxil: lcd_goto(0, 1);
03:33 AM nuxil: starts at index 0 on lcd each time.
03:33 AM nuxil: on line 2
03:33 AM Emil: this is a serious case of not reading the fucking manual
03:33 AM Emil: pgm_read_word reads a single int
03:34 AM Emil: this is so wrong it hurts
03:34 AM Emil: imma save it for posterity
03:35 AM Emil: nuxil: https://www.nongnu.org/avr-libc/user-manual/group__avr__pgmspace.html please review
03:38 AM Emil: if you want to print a string you do it this way: pE(address){b=pgm_read_byte(address); while(b){print(b); b=pgm_read_byte(address++);}}
03:38 AM nuxil: dude
03:38 AM nuxil: what do you think the lcd_print_p does
03:39 AM Emil: something buggy or broken
03:39 AM nuxil: yes.. but might be my lcd_print_p function tho..
03:39 AM nuxil: gonna recheck it.
03:40 AM Emil: why are you reading ints anyways
03:40 AM antto: nuxil u have made teh Emil angry
03:40 AM nuxil: FFS...
03:40 AM antto: nao u suffer teh consequences
03:40 AM nuxil: my own fault :p
03:41 AM nuxil: issue sorted out :p
03:41 AM antto: but Emil is still angry
03:41 AM Emil: _why_are_you_reading_ints
03:41 AM Emil: _
03:41 AM antto: u gon' suffer, boi
03:42 AM Emil: and what was the issue
03:43 AM nuxil: the issue was and is not enuf coffee :p
03:43 AM Emil: I'm far more interested in the other question
03:44 AM nuxil: wrong flashdata.h file i included :p
03:45 AM nuxil: well. dont i feel silly :p
03:46 AM Emil: ++address above btw
03:58 AM Emil: nuxil: nuuuuuuxiiiiiil
03:58 AM Emil: answer the question yo
03:58 AM Emil: why are you reading ints?
04:00 AM * antto prepares 250mg of "truth serum"
04:00 AM nuxil: hu im not following?
04:01 AM nuxil: where are my ints ? does it matter ? char ints. poteto, potato :p
04:01 AM Emil: >pgm_read_word
04:02 AM Emil: oh nvm I was using those two
04:02 AM Emil: too*
04:02 AM Emil: kek
04:02 AM Emil: you are forgiven
04:03 AM antto: (akchually, he's not)
04:04 AM nuxil: well. need the address of the array TXTS that has TXT1 & TXT2
04:04 AM antto: why does there have to be yet another array for the pointers
04:04 AM antto: this sux
04:04 AM Emil: antto: doesn't
04:04 AM nuxil: it doesnt
04:05 AM Emil: antto: you are free to not put the pointers into progmem
04:05 AM Emil: in which case they live in ram
04:05 AM antto: no, not that way
04:05 AM antto: just directly as if they were constants/literals/whatever
04:06 AM nuxil: http://tom-itx.no-ip.biz:81/~webpage/abcminiuser/articles/progmem_basics_index.php
04:06 AM Emil: the libc page is clear on it
04:07 AM Emil: https://www.nongnu.org/avr-libc/user-manual/pgmspace.html
04:07 AM nuxil: Tom's page is a good guide too.
04:08 AM antto: http://tom-itx.no-ip.biz:81/~webpage/abcminiuser/articles/icon_twisted.gif
04:08 AM antto: >:)
04:24 AM polprog: nostalgic
04:24 AM polprog: hehe
04:25 AM polprog: one question though
04:26 AM antto: 42
04:26 AM polprog: execution time, that means the string are copied when the function is called, or at the start of the program? because i think its the latter
04:27 AM antto: eh? that's not what PROGMEM is about
04:31 AM nuxil: polprog, i think the 1st. execution time is the time a call takes etc. and runtime is how long your hole program has been "executed" :p
04:34 AM nuxil: if you dont agree i will start tossing PIC's at you :)=
04:34 AM polprog: maybe i misread the docs
04:35 AM polprog: what i mean is that i imagined the string is phhsically in ram throughout all its scope
04:36 AM polprog: ill read libc-avr doc again
04:38 AM eimiar: i probably figured out why i can't use my ftdi breakout board to program the avr
04:38 AM nuxil: why?
04:38 AM eimiar: my pc usb voltage is 4.75V
04:38 AM eimiar: i measured voltage between vcc and gnd pins
04:39 AM eimiar: and i get 3.5 V
04:39 AM eimiar: insane voltage drop
04:39 AM nuxil: oh. well 4.75v that should be within usb specs tho,
04:39 AM nuxil: iirc
04:39 AM eimiar: yeah but i don't get why such a high voltage drop occurs
04:40 AM nuxil: is there a linear regulator on that board ?
04:40 AM nuxil: or a regulator ?
04:40 AM eimiar: oh... don't know
04:41 AM eimiar: http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_Lite_User%27s_Manual
04:41 AM nuxil: Highly integrated design includes 5V to 3.3/+1.8V LDO regulator for VCORE, integrated POR function
04:41 AM eimiar: i might wanna get +5V from an external source
04:43 AM nuxil: well.. if the ftdi chip is a 3.3v chip.. you need a logic shifter for your atmega32.
04:44 AM eimiar: no problem with that
04:44 AM eimiar: already figured out that avr accepts 3.3V in VIH range
04:45 AM nuxil: isnt that out of its specs ?
04:45 AM eimiar: it's only the reset button that needs 5V
04:45 AM nuxil: ok
04:45 AM eimiar: for that i use a shifter i made with a npn
04:46 AM polprog: eimiar: most likely a shit cable
04:46 AM eimiar: nuxil, VIH min (says datasheet) is 0.6*VCC, which is 3V
04:47 AM eimiar: polprog, i'm using the same cables i used with the raspberry pi
04:47 AM eimiar: i had no problem there
04:47 AM polprog: i mean, the one that connects between the FTDI board and the PC
04:47 AM eimiar: oh
04:47 AM eimiar: yeah that cable is different
04:47 AM eimiar: but is much much shorter than the other one
04:47 AM polprog: did you measure voltages at the board?
04:48 AM eimiar: polprog, yeah. measurements show 4.75V on the board and 3.5V on the avr pins
04:48 AM polprog: odd
04:48 AM polprog: try to find where it drops
04:49 AM nuxil: the ldo drops it ofc
04:49 AM polprog: i mean
04:49 AM polprog: if its supposed to be 5V on the pins and its 3.5 then its baaad.
04:49 AM eimiar: nuxil, shouldn't the LDO be used to step down 5 -> 3.3?
04:49 AM polprog: also 3.5 is a weird voltage... to much for a 3v3 ldo
04:49 AM nuxil: eimiar, nothing is perfect
04:50 AM polprog: 3.4 id pass. but 3.5 seems awfully high for a 3v3 output
04:50 AM eimiar: nuxil, i don't think i'm following you... my VCC has to be 5V, not 3.3V
04:50 AM nuxil: oh.
04:51 AM nuxil: but datasheet said that ftdi board has a integrated ldo regulator. 5v to 3.3
04:51 AM eimiar: polprog, i think you are as confused as nuxil
04:51 AM polprog: i may
04:51 AM nuxil: erm not datasheet. that spec links
04:52 AM nuxil: On board 3.3V LDO
04:52 AM eimiar: i'm working on an atmega32, which needs 5V, using a TUMPA-Lite SPI interface to program it
04:52 AM eimiar: now, tumpa-lite plugs to usb so needs 5V
04:52 AM eimiar: internally steps down to 3.3 with a LDO
04:53 AM nuxil: outputs pin volts with 3.3v .. so just hook up +5v and gnd form usb to your atmega.
04:53 AM eimiar: from tumpa lite pins i connect 5V to VCC on the m32
04:54 AM eimiar: the problem is that: 5V on tumpa-lite is actually 4.75V. and somehow VCC on m32 is 3.5V
04:54 AM eimiar: a drop of 4.75-3.5=1.25V on the cable!
04:54 AM polprog: bbl, i need to get my ID card done
04:54 AM nuxil: wot kind of cable are you using ??
04:54 AM nuxil: lol.. or is that cable 10meter long ?
04:54 AM eimiar: normal dupont cable 20 cm
04:55 AM eimiar: my guess is that m32 sinks too much current
04:55 AM eimiar: out of my pc's specs
04:55 AM nuxil: no way. the usb should habdle that
04:55 AM nuxil: *handle
04:55 AM eimiar: but even so, voltage across the cable should be about the same
04:56 AM nuxil: heh. thats insane. get your multimeter and mesure the resistance in that cable :p
04:59 AM Emil: eimiar: you have something broken
04:59 AM Emil: your m32 should only be sinking 200mA max
05:00 AM Emil: usually like 20mA
05:01 AM nuxil: iirc usb1 allowed upto 500mA. and usb2++ allowes even more.
05:01 AM Emil: there are power limits
05:01 AM Emil: really, if you want more than nmA you must "negotiate" for it
05:02 AM Emil: practically speaking all USB ports give you 500mA without even asking
05:05 AM nuxil: well its more complicated that that.. for low power devices it has a max power of 100mA. while highpower devices like pc and such can do that.
05:05 AM Emil: nuxil: like I said
05:05 AM Emil: practically speaking all ports give you 500mA without asking
05:05 AM Emil: it goes exactly like I said
05:06 AM Thrashbarg: lots of negotiations to get more power. Sounds like Parliament
05:06 AM nuxil: lol.
05:06 AM Thrashbarg: xD
05:07 AM nuxil: eimiar, also keep in mind. usb cables can have resistance upto 90ohms.
05:07 AM eimiar: O.O
05:07 AM eimiar: still, voltage on board is 4.75V
05:10 AM antto is now known as h4x0riz3d
05:11 AM nuxil: eimiar, didnt you have your PI working as a programmer ?
05:11 AM eimiar: i did
05:11 AM nuxil: so. why not use it?
05:12 AM eimiar: because to operate on a pi i'd need it to keep it in a network or on a screen with a keyboard
05:12 AM eimiar: if i want to turn it off i need to run the poweroff command and if i want to turn it on i have to wait 2 minutes
05:12 AM eimiar: tumpa-lite? plug n play.
05:13 AM nuxil: Meh.. uptime:
05:13 AM nuxil: 11:37:47 up 8 days, 2:29, 1 user, load average: 0.18, 0.07, 0.01
05:13 AM nuxil:
05:14 AM nuxil: i just keep mine on,, it sits and wastes like 2-3Watts. :p
05:14 AM nuxil: and ssh into it when i need to flash.
05:21 AM Emil: same
06:15 AM polprog: i need to check the uptime on my laptop
06:16 AM polprog: i dont reboot it, just close the lid when i finish what i wanted to do
07:40 AM polprog: yay
07:40 AM polprog: scope is all calibrated now
07:40 AM h4x0riz3d: QC PASSED
08:02 AM polprog: HI POT OK
08:02 AM h4x0riz3d: QUE?
08:03 AM polprog: heh, id like to know what a hi pot test is actually
08:03 AM polprog: ah
08:03 AM h4x0riz3d: could it be a hi-pot-etical test?
08:05 AM polprog: tests if your device can whithstand a hippopotamus attack
08:07 AM h4x0riz3d: so if you got a device with a HI POT OK sticker - does it smell like hippo butt?
08:24 AM Emil: why would it
08:25 AM h4x0riz3d: have you seen a hippo?
08:25 AM h4x0riz3d: it's 60% "a$$" and 100% covered in sh*t
08:33 AM Emil: IT'S 40% money?
08:33 AM Emil: _niec_
09:27 AM Ameisen: but yeah
09:27 AM Ameisen: as per yesterday... trying to figure out if looping instead of using an ISR will enable higher step rates
09:27 AM Ameisen: just not sure if I can reasonably do that without completely choking out everything else
09:31 AM h4x0riz3d: step rates?
09:46 AM rue_mohr: how high?
09:46 AM rue_mohr: are you using a 1000 microstep driver on a 200ppm stepper and trying to get 400 rpm?
10:18 AM h4x0riz3d is now known as antto
10:52 AM polprog: got an idea
10:53 AM polprog: ive got some potentiometers.. why dont i connect them to the ADC of an stm32 as input devices and try to make a dirty square wave generator out of it
10:53 AM polprog: i just need to be abpe to shift phases and adjust frequencies
10:53 AM nuxil: dude
10:53 AM nuxil: just take a atmel chip and make a simple dds using r2r network
10:53 AM nuxil: then you can have all waveforms you like
10:55 AM nuxil: just use this as a template and idea. https://scienceprog.com/avr-dds-signal-generator-v20/
11:35 AM polprog: i want to learn how to use ADC on stm32
11:40 AM thardin: grr codelite messes up my emoji
11:40 AM Emil: polprog: just write and read registers yo
11:40 AM Emil: I bet it's the same as on avr
11:40 AM thardin: emoji works fine sending over serial btw
11:41 AM thardin: alas "strings" strips them
11:58 AM polprog: Emil: i dont have time for that now
12:19 PM Emil: polprog: but isn't libopencm3 quite easy to use
12:19 PM Emil: I bet there's quite many examples on how to bluepill it
12:20 PM polprog: i know
12:21 PM polprog: i am using libopencm
12:25 PM polprog: http://polprog.net/papiery/stm32/Bluepillpinout.gif
12:25 PM polprog: this
12:25 PM polprog: is
12:25 PM polprog: bullshit
12:26 PM polprog: i dont know if this pinout is for retarduino
12:26 PM polprog: but i just spent a good 40 mins
12:26 PM polprog: trying to find out why my usart was not working
12:26 PM polprog: and it turns out
12:27 PM polprog: USART1_TX is on PA9 not anywhere else
12:27 PM polprog: thanks fucking god i decided to take a look into the datasheet
12:27 PM polprog: as for that picture
12:27 PM polprog: into the trash it goes
12:27 PM polprog: >pinout discarded
12:28 PM nuxil: tx1 is on pn6 :p
12:28 PM nuxil: *pb
12:28 PM polprog: according to my breadboard its on a9
12:29 PM polprog: and http://www.st.com/content/ccc/resource/technical/document/datasheet/33/d4/6f/1d/df/0b/4c/6d/CD00161566.pdf/files/CD00161566.pdf/jcr:content/translations/en.CD00161566.pdf page 31
12:31 PM nuxil: well. usart can be on both pa and pb.. if you remap the functions.
12:31 PM nuxil: according to datasheet. did you set up registers and shit corretly ?
12:33 PM polprog: no, i dont remaps
12:33 PM polprog: remap*
12:33 PM polprog: ill try adc now
12:34 PM nuxil: do your plan is to use the potmeter to adjust the frequency ?
12:34 PM nuxil: *so
12:34 PM polprog: basically yes
12:36 PM nuxil: got a 10 turn pot ?
12:37 PM polprog: no, a regular one
12:37 PM polprog: 10k, linear
12:37 PM polprog: whatever works
12:37 PM polprog: i wanted to try a phase shift detector
12:38 PM nuxil: ok. will work.. but might be hard to get presice wanted frequency without some dicking on the knob.
12:38 PM polprog: so i need two frequencies that are the same and a way to shift one agains another
12:38 PM nuxil: 180 deg?
12:39 PM polprog: it doesnt matter if they arent spot on in value, just need to have two of the SAME freq and adjustable shift
12:39 PM nuxil: if you just want to invert the signal a transistor will do it.
12:39 PM polprog: no
12:39 PM polprog: i dont want to invert anything
12:40 PM polprog: i will just run in a loop toggling GPIOS to generate two squares of the same frequency shifted in phase
12:40 PM polprog: i dont want to hardcode the phase shift so i figured ill just take a raw ADC value
12:41 PM polprog: from a pot, so when i turn it, it get shifted more or less
12:41 PM nuxil: so you just want a delay on the 2nd frequency
12:41 PM polprog: adjustable, yes
12:41 PM nuxil: be able to control it.
12:42 PM polprog: nothing less, nothing more
12:42 PM polprog: the pot is just an input device
12:45 PM polprog: printhex8 vs printHex16 rue_mohr pls
12:45 PM polprog: :DD
01:52 PM polprog: nice
01:52 PM polprog: im controlling the ADC by directly writing to registers
01:52 PM polprog: now do i want that...
02:01 PM polprog: nice
02:01 PM polprog: ADC done
02:18 PM nuxil: asm?
02:31 PM TechChristoph: nuxil: assembler?
02:31 PM nuxil: yea
02:43 PM day__ is now known as day
03:01 PM nuxil: polprog, hows it going, got it working ?
03:09 PM Emil_ is now known as Guest84508
03:09 PM Emil is now known as Guest86601
03:09 PM `z is now known as Guest54512
03:09 PM dsal is now known as Guest30389
03:09 PM Sadale is now known as Guest27265
03:09 PM grummund_ is now known as Guest62216
03:09 PM Casper is now known as Guest549
03:09 PM gruetzkopf is now known as Guest41456
03:09 PM LoRez is now known as Guest95798
03:09 PM vishwin is now known as Guest62756
03:09 PM nuxil: 0.O
03:09 PM polprog: nuxil: i got an alpha version working that just reads adc and then loops
03:09 PM polprog: oh yeah. services are down
03:10 PM polprog: didnt you get the global notice?
03:10 PM nuxil: just got. -NickServ- You are now identified for nuxil.
03:10 PM polprog: i can turn the pot and the frequency changes
03:10 PM nuxil: and i identified myself hours ago :p
03:11 PM nuxil: so you need 2 pots
03:11 PM nuxil: one to adjust the delay /phase shift. and one to adjust the freq.
03:11 PM polprog: yeah
03:11 PM polprog: im thinking
03:11 PM polprog: maybe some timer + adc ISR voodoo
03:12 PM polprog: or just running in a loop
03:12 PM Guest95798 is now known as LoRez
03:12 PM polprog: implementing a sort of a state machine
03:12 PM polprog: or even simpler
03:13 PM polprog: assert/deassert two pins based on a simple comparison, run ADC task in ISRs
03:15 PM polprog: yeah i like the latter one better
03:16 PM Guest30389 is now known as dsal
03:17 PM dsal is now known as Guest61666
03:20 PM TechChristoph: what microcontroller are you using ?
03:24 PM Guest86601 is now known as Emil
03:25 PM Guest62756 is now known as vishwin
03:29 PM Emil: Thrashbarg: bluepill stm if I'm not mistaken
03:29 PM Emil: if it's still the stm thing
03:29 PM Emil: and not suddenly avr
03:32 PM AndrevS: ah, the bluepill, stm32f103c8t6, I have a few of them
03:37 PM nuxil: I still got my nucleo in the orginale package :p
03:42 PM polprog: might get a nucleo
03:42 PM polprog: wonder if they have it in the shop that i visit sometimes
03:42 PM polprog: otherwise ill just pass
03:42 PM nuxil: polprog, how do you calulate the delay time on the 2nd frequency ?
03:42 PM nuxil: you could do something like. lets assume you want 1 deg phase shift.
03:43 PM nuxil: F = 1000 ; T = 1 / F ; Deg = 1; Delay = (Deg / 360) * 100 = 0.27%
03:43 PM nuxil: (0,27 * 0.001) / 100 = 2.7 us ,after Freq1.
03:43 PM nuxil: -NickServ- You are now identified for nuxil.
03:43 PM polprog: ill just make an if that toggles the pin at a certain i
03:43 PM nuxil: Deg = 180; Delay = (180/ 360) * 100 = 50 ; 0,27 * 0.001 = 0.05 Sec
03:43 PM nuxil: erm
03:43 PM nuxil: 50 * 0.001
03:43 PM polprog: well see
03:44 PM polprog: it doesnt have to be a) accurate nor b) complicate
03:44 PM polprog: d
03:44 PM polprog: ill have to read about VCOs later
03:55 PM polprog: https://www.youtube.com/watch?v=SS7z8WsXPMk
03:55 PM polprog: this basically. i wanna build a PLL
04:16 PM nuxil: Get a atiny85. its PLL can do 64Mhz :)
04:27 PM x7C3_ is now known as x7C3
04:30 PM polprog: night
04:30 PM polprog: nuxil: nah i want to build one myself
04:30 PM polprog: :P
04:31 PM nuxil: alright.
04:31 PM nuxil: good night
04:34 PM Guest61666 is now known as dsal
04:52 PM nuxil: polprog, https://www.youtube.com/watch?v=NKbE5jcLF3U
04:52 PM nuxil: dont get wet dreams now :p
05:08 PM polprog: too old nuxil
05:08 PM polprog: lel
05:08 PM nuxil: :p
05:12 PM polprog: https://youtu.be/E0h8BUUboP0
05:14 PM polprog: i need to get a serial modem
05:14 PM polprog: https://youtu.be/OR5n8R10iAM
05:21 PM nuxil: amazing what he done on the 1st link.
05:25 PM nuxil: this just shows you how "Unoptimized" software in general is today :)
05:26 PM nuxil: if you manage to do this with 4.7mhz.. what can you really do with 3-4ghz if code was as optimized as that :p
05:34 PM polprog: hehe true
05:34 PM polprog: cant sleep
05:34 PM polprog: :/
05:34 PM polprog: actually your r2r dac idea gave me an idea
05:35 PM polprog: i wanted to build a bitcrusher
05:35 PM polprog: now thats easy
05:35 PM Emil: https://www.youtube.com/watch?v=E0h8BUUboP0
05:35 PM Emil: ah same link wrong channel
05:35 PM Emil: But that video is super cool
05:35 PM polprog: ill just run an adc and copy ADCL to PORTx
05:35 PM Emil: avr?
05:36 PM polprog: yea
05:36 PM Emil: bro
05:36 PM Emil: ADMUX|=(1<<ADLAR); and then just read ADCH
05:36 PM nuxil: you give up on stm?
05:36 PM polprog: that is what i meant
05:36 PM polprog: lol no
05:36 PM Emil: but your wrote ADCL :D
05:36 PM polprog: i meant adch :p
05:37 PM polprog: tomorrow ill try to crack how to write ISRs on stm32
05:38 PM Tom_L: good luck
05:39 PM polprog: are you saying this ironically :p
05:40 PM nuxil: Emil, dont you also need to start the adc mesurment by setting the adsc bit in the adcsra?
05:43 PM polprog: niters (now for real)
05:44 PM nuxil: g.night
05:46 PM Emil: nuxil: not a full example
05:46 PM Emil: it was only taking a shot at the single thing
05:46 PM Emil: polprog: good night
08:14 PM kiki_lamb: I don't currently have serial on the tiny I'm testing this on, but it seems like AVR handles shifting signed numbers 'correctly'/'intelligently', insofar as in it seems to not screw up the sign bit. Am I correct about that?
08:32 PM rue_shop4: I have serial out for a tiny
08:51 PM Guest549 is now known as Casper
08:55 PM nuxil: shifting on signed ints?
08:55 PM nuxil: you cant do that
08:55 PM nuxil: that will just result in a mess
08:57 PM nuxil: just try.. example. leftshift 64 by 1. you get -128. rightshift back and you end up at -64
09:00 PM Thrashbarg: good old sign extend
09:00 PM Thrashbarg: like when you negate -128 you get -128
09:01 PM Thrashbarg: weird anomalies
09:04 PM nuxil: if i have understood >> << correctly. it just interprets it as a bit-pattern,, so its doing what it should
09:05 PM Thrashbarg: yup
09:05 PM Thrashbarg: using unsigned ints or chars will suppress the sign extend however :P
09:05 PM Thrashbarg: I'm sure you're aware of this
09:06 PM Thrashbarg: though there's a lot of undefined behavior when it comes to shifting
09:08 PM nuxil: time for a nap.
09:09 PM Thrashbarg: good
09:10 PM kiki_lamb: ah, okay, guess I happen to have some lucky combinations of numbers where the error isn't perceptible in my output, then.
11:46 PM day__ is now known as day