#avr Logs

Jan 16 2018

#avr Calendar

03:02 AM nohitzwork: morning
04:22 AM nohitzwork: im gonna start using notebooks
04:22 AM nohitzwork: there's always these little things that you think you remember about a project but you always forget
04:23 AM nohitzwork: its better to just take a dedicated notebook and write everything down
04:23 AM _ami_: nohitzwork, good idea.
04:24 AM _ami_: i do it all the time.
04:24 AM cehteh: i'd rather document things in source
04:24 AM _ami_: :D
04:24 AM _ami_: i like making notes. especially things related to electronics/MCUs
04:28 AM nohitzwork: i dont think source socde is the right place for documenting things
04:29 AM nohitzwork: execpt doxygen
04:31 AM nohitzwork: if the description is long and its not software releated, it would feel out of place in the source
04:39 AM _ami_: grep bugs /proc/cpuinfo|uniq
04:39 AM _ami_: bugs : cpu_meltdown
04:39 AM _ami_: damn, its applied in arch kernel
04:40 AM Haohmaru: putchar(0x55); // TODO: reverse the input diode or the thing will explode
08:56 AM nuxil: oh man. so i was messing around with _delay_ms and saw that it didnt work as i wanted it to. so diggig around a bit i see that there is a max delay you can use before the resolution decreases.
08:56 AM nuxil: comment from delay.h "The maximal possible delay is 262.14 / F_CPU
09:30 AM nuxil: is it possible to define a for loop in a macro on a single line ? like
09:31 AM nuxil: #define sleep_s(x) ({for(i=0; i < x*1000; i++) _delay_ms(1);})
09:31 AM nuxil: instead of having the define over seperate lines. cos then i just be writeing a func instead.
10:00 AM cehteh: nuxil: ({}) is a gcc speciality, but its not neeeded here
10:01 AM cehteh: C doesnt care about lines, you can define everything in a single line as long the semicolons are correct or you can break #defines over multiple lines with backslash-newline at the end
10:02 AM cehteh: #define foo \
10:02 AM cehteh: for(...)\
10:02 AM cehteh: { ...}
10:02 AM cehteh: etc
10:21 AM polymorph: hello
10:21 AM polymorph: Who scores >130 on a hard iq test? (not the primary school one)
10:22 AM skz81_: don't answer guys, it's a trap !!
10:22 AM polymorph: :)
10:26 AM skz81_: polymorph, btw ; IQ test should not be "hard" or "easy" (given you're part of the intended "audiance" ==> they should have a "normal" at score 100)
10:26 AM nuxil: cehteh, that mutiple lines, i asked for a single line :p
10:26 AM skz81_: unsure of the wording, by "normal" I mean : 50% under, 50% above
10:26 AM cehteh: i gave you the answer about single line as well
10:26 AM polymorph: skz81_: i mean that there are iq tests meant for 8 year old children
10:27 AM nuxil: cehteh, well the example i used gives me error. whats wrong with it?
10:27 AM polprog: i got a six from my iq test!
10:27 AM cehteh: your C skillz
10:27 AM cehteh: but .. anyway. you should never ever sleep with delay for extended times
10:28 AM polymorph: you can.
10:28 AM polymorph: use nonblocking wait
10:28 AM cehteh: extended as in more than a few microseconds :D
10:28 AM nuxil: cehteh, yes i know my C skills suck :p tell me something i dont know :p
10:28 AM cehteh: busy loops are bad
10:28 AM polymorph: oh wait you are not on linux
10:29 AM nuxil: like what was wrong with that define ?
10:29 AM cehteh: i didnt know what you've done wrong the ({.. }) thing you shown should work
10:29 AM cehteh: and without ({}) it should work as well
10:29 AM cehteh: ah you need to define i
10:29 AM cehteh: #define sleep_s(x) for(int i=0; i < x*1000; i++) _delay_ms(1)
10:30 AM polymorph: ({}) is a codeblock/herecode.
10:30 AM cehteh: eh crap code, integer overflows ...
10:30 AM cehteh: thats a gcc extension
10:30 AM cehteh: you can use that, but its not necessary
10:31 AM cehteh: #define sleep_s(x) for(int i=0; i < x; i++) _delay_ms(1000)
10:31 AM nuxil: oh right.
10:31 AM polymorph: Macro Magic in C (gcc), functional logic, polymorphism https://pastebin.com/z0sw6hK7
10:31 AM nuxil: no dont delay ms that long. read the delay.h
10:31 AM cehteh: how about that? instead the multiplication
10:31 AM nuxil: you loos precition
10:31 AM cehteh: yeah delay is baaaaad
10:31 AM polymorph: interrupts and timers is the way to go
10:31 AM cehteh: you have timers use them
10:32 AM cehteh: which also allows the mpu go into real power save sleep
10:32 AM cehteh: or do something else
10:33 AM nuxil: meh. i want the mcu to spit as many mW as it can :p
10:36 AM cehteh: then short circuit the outputs
10:37 AM nuxil: and wait for the magic smoke ?
10:37 AM cehteh: avr's dont smoke :D
10:38 AM nuxil: :)
10:39 AM polymorph: they can
10:39 AM polymorph: haven't tried yet
10:39 AM polymorph: When te smoke comes out it would stop working
10:41 AM polprog: https://www.youtube.com/watch?v=mZ7pUADoo58
10:41 AM polprog: just dont do that and it will be ok ^^
10:42 AM nuxil: lol
10:48 AM polymorph: I want to use the same parallel port adapter for avrdude and arm, anybody did this before?
10:49 AM polymorph: i mean avr and arm, with avrdude
10:49 AM polymorph: and with openocd
10:51 AM polprog: me too
10:54 AM nuxil: i got a pi with my own header board i use for atinys/atmrga324 avr. i been thinking about expanding it, including jtag well.
10:54 AM polprog: i think i will go with the Pi as well..
10:55 AM polymorph: polprog: i was thinking about this: https://wiki.openwrt.org/doc/hardware/port.jtag.cable.buffered or the xilinx progammer adapter
10:56 AM polprog: but instead of making a normal bodge on header i will probably make one with a level converter with selectable voltage (like 5V, 3V3 and 1V8)
10:56 AM polprog: brb
10:57 AM polymorph: polprog: 5v and 3v3 can be compatible if you get the power from the curcuit
10:57 AM polymorph: there are compatible 125's btw from nxp
10:58 AM polymorph: they do level shift too
11:00 AM polprog: polymorph: i know but i wanna learn how to use an active level converter
11:00 AM polymorph: polprog: http://uk.farnell.com/nxp/74lvc125abq/ic-qd-buff-driver-tri-st-dhvqfn14/dp/2164869
11:00 AM polprog: i found LSF010x
11:00 AM polymorph: The 74LVC125ABQ is a quad non-inverting Buffer/Line Driver with 3-state outputs (nY) that are controlled by the output enable input (nOE). A HIGH at nOE causes the outputs to assume a high-impedance OFF-state. Inputs can be driven from either 3.3/5V devices and when disabled, up to 5.5V can be applied to the outputs.
11:00 AM nuxil: polymorph, schmitt trigger :p
11:00 AM nuxil: none inverting
11:01 AM nuxil: ment at polprog
11:02 AM polprog: when i get a blue pill ill just connect the gpio header to the board and flash it that way, when i get that working ill poke around with isolation/level converters
11:03 AM polprog: right now im not at home so i cant do much :P
11:42 AM nuxil: for this crystal ( https://www.elfa.se/Web/Downloads/_t/ds/hc49_eng_tds.pdf ). what caps should i use? datasheet says in range 10 to 75pf. avr datasheet says for full swing mode i should use 12-22pf. so should i use 12 or 22 ? or something in between. ?
11:46 AM cehteh: read newest avr datasheet, they stopped support for full swing crystals, often the low power driver can operate them too, but there are some known issues
11:50 AM nuxil: http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42743-ATmega324P_Datasheet.pdf
11:50 AM nuxil: scroll to page 46.
11:50 AM nuxil: it still in the datasheet.
11:51 AM nuxil: section 10.4 fullswing crystal oscillator
11:51 AM cehteh: 324 or 328?
11:51 AM nuxil: 324
11:51 AM cehteh: well thne ok, the change was iirc only on the 328
11:51 AM Jartza: nuxil: depends how you connected them
11:52 AM nuxil: Jartza, as shown at sectionm 10.2 :p
11:52 AM nuxil: *section
11:52 AM cehteh: usually these caps are not overly critical and need to be adjusted to the crystal and inductance(trace layout, length) you have there
11:53 AM cehteh: for production i'd made a prototype and test out at what min/max values the crystal swings and then pick something in the middle
11:53 AM Jartza: nuxil: go with 22pF
11:53 AM nuxil: oki
11:54 AM cehteh: yes thats the recommended valiue, people used much more with success as well (40-50pF)
11:54 AM cehteh: nothing guranteed, but when it works, it works
11:55 AM polymorph: pins have 5pf internal capacity btw, your traces on the board add capacitance too, so a 32768 Hz xtal does not require any capacitors added
12:01 PM Jartza: well, with 22pF capacitors your total capacitance will be 22pF + stray capacitance of traces + possible chip internal capacitance
12:02 PM polymorph: so if xtal calls for 22p thes 15p will be enough
12:05 PM nuxil: but if the datasheet says it requires a range x-y. havent they taken the internal cap into their calulations for whats required ?
12:07 PM nuxil: if dateshee says you should use 10pf. you dont put a 5pf there cos of internal cap. then youre nor operating in specs of datasheet :p
12:07 PM nuxil: idk.
12:08 PM nuxil: anywho. time to solder these caps on. and burn some fuses :D
12:08 PM nuxil: i hope i got the low fuses right tho.
12:09 PM nuxil: 0xf7
12:10 PM cehteh: datasheet will tell if they take the internal capacitance into account
12:10 PM cehteh: but for sure they cant calculate your traces
12:10 PM Jartza: nuxil: put 22pF :)
12:10 PM cehteh: ack
12:11 PM cehteh: or test what min/max works when you have the patience or going for a big batch run
12:11 PM Jartza: you have to remember that the capacitors are effectively in series
12:13 PM Jartza: forget the ground connection, it's basically just DC reference point in oscillation circuit
12:14 PM Jartza: your pcb traces are practically 2-3pF and then whatever the internal capacity is
12:14 PM Jartza: most probably 3-5pF
12:16 PM cehteh: solution: use trimmer caps, oscilloscope and µA meter, determine the optimal point where the crystal swings :D
12:25 PM nuxil: alright. 22p in.
12:26 PM nuxil: but what confuses me now. what should i define cpu clk as ? F_CPU 20000000UL ?
12:28 PM Jartza: cehteh: that's not a solution. when you add oscilloscope probe to that circuit, your capacitance is not even close of what you think it is.
12:28 PM Jartza: nuxil: whatever your oscillator is in Hz
12:29 PM Jartza: if it's 20Mhz, then 20000000
12:30 PM nuxil: well. thats even more confusing.
12:31 PM nuxil: i mena.
12:31 PM nuxil: the datasheet on crystal sais; Frequency
12:31 PM nuxil: 1.8432 to 270.0Mhz
12:32 PM Jartza: well the same kind of crystal is probably available in multiple speeds :)
12:32 PM Jartza: usually the speed in stamped on crystal
12:32 PM Jartza: like 20.000 on top of it
12:33 PM Jartza: manufacturer would drown in datasheets if they produced different datasheet for same crystal but with different speed
12:34 PM nuxil: yes. i needed see now
12:34 PM nuxil: thx
12:35 PM Jartza: just look at the crystal :)
12:35 PM nuxil: i did :D
12:36 PM Jartza: so what does it say? :)
12:37 PM nuxil: only 16Mhz :(
12:37 PM nuxil: i need to order a 20Mhz one
12:37 PM nuxil: :p
12:37 PM antto: do you have two?
12:37 PM nuxil: i do.
12:38 PM antto: cut one fouth of one, add it to the first one
12:38 PM antto: 20MHz \o/
12:38 PM nuxil: ^^
12:39 PM Jartza: nuxil: http://www.statek.com/pdf/tn31.pdf
12:39 PM Jartza: that's a good read for a start :)
12:40 PM nuxil: oh. some good math snack :)
12:40 PM nuxil: will save for later reading
12:41 PM Jartza: yea
12:41 PM Jartza: of course in case of MCU, the amp and the resistor usually is inside MCU
12:41 PM Jartza: but other than that, most of the circuits are still just basic Pierce oscillators
12:45 PM Jartza: strangely, none of the manufacturers tell you the real parameters of their chips
12:45 PM Jartza: it's like a secret society of black magic
12:45 PM nuxil: :D
12:45 PM Jartza: I dare you, ask Atmel, Microchip, NXP or whatever any of their chips transconductance in oscillator input ;)
12:46 PM Jartza: the best answer so far.. "it has some"
12:46 PM Jartza: most don't even reply to question itself
12:46 PM Jartza: you just get reply "use 22pF capacitance"
12:51 PM polprog: shit this reminds me i should continue to read on the book, i forgot what transconductance was, lol
12:52 PM polprog: hmm i think i remember now
12:52 PM polymorph: nuxil: i mean the manufacturer datasheet of the xtal, they define their product's requirement and they have nothing to do with what you use it with
12:53 PM polymorph: cehteh: overloading xtal reduces/shifts its frequency
12:54 PM polymorph: few pf+ and your clock is off
12:54 PM Jartza: too little capacitance and the crystal won't start oscillating. too much and it again stops oscillating :)
12:54 PM Jartza: with trial and error you can find low and high limits :D
12:55 PM Jartza: BUT it doesn't mean that center of them is the perfect
12:55 PM polprog: you dont have your special crystal poking stick?
12:55 PM polymorph: nuxil: yeah you have to define your actual cpu freq for delay() to work for example
12:55 PM cehteh: polymorph sure
12:55 PM cehteh: hey .. trimmer caps and servos!!!!!
12:59 PM polymorph: you can't tune an xtal wide range, only a few thousand ppm maybe?
12:59 PM polymorph: +-few pf means that
12:59 PM polymorph: and it has optimal stability at defined capacitors
01:00 PM polymorph: USB is a bitch for example :)
01:00 PM polymorph: it requires 12000000 MHz xtal
01:01 PM polymorph: it requires 12.00000MHz xtal
01:01 PM polymorph: and idiotic standards are defined in the pdfs
01:02 PM polymorph: firewire is the only proper way in asynchronous mode
01:02 PM polymorph: it is used on fighter jets and satellites
01:04 PM polprog: the only applicane that used firewire i have at home is a super high end audio dac/adc
01:04 PM polprog: appliance*
01:04 PM polprog: i wonder why firewire died... looked like a nice standard
01:04 PM polymorph: i have an old video camera that does firewire
01:04 PM polprog: oh and that too
01:04 PM polprog: it used minidv
01:05 PM polymorph: i also have business class laptops with firewire
01:05 PM polprog: i have had a sony vaio
01:05 PM polymorph: how did it die? because most consumers use usb shit?
01:05 PM polymorph: firewire is still on fighter jets and satellites, and still works
01:05 PM polprog: is there any _widely used_ consumer standard that is not serial transmission?
01:06 PM polymorph: no
01:06 PM polymorph: consumer is now shit and even shitter
01:06 PM polymorph: a big plus if you can't simply hack it as you want.
01:07 PM polymorph: they tried to remove parallel port too
01:07 PM polymorph: i searched for a motherboard that has one and only bought that
01:07 PM polprog: firewire in satellites? possible. i dont remember much from satellite design intro
01:07 PM polprog: i think CANbus as well might be there
01:07 PM polymorph: they call it SpaceWire
01:08 PM polymorph: new firewire standards are synchronous too
01:08 PM polymorph: i only saw an old one that is osynchronous
01:08 PM polymorph: a
01:11 PM polprog: satellite design is soe next level fun
01:31 PM polprog: making this on an avr still is on my mind... just need to get a nice oled/lcd screen
01:31 PM polprog: https://www.youtube.com/watch?v=9_1Xb9zXWf4
01:31 PM polprog: i should read one book on composing music
01:32 PM polprog: because most cool chiptune is really very very simple tunes
01:54 PM polprog: whats the point of an .lst file
01:54 PM polprog: what is it used for usually?
02:04 PM Emil: https://emil.fi/d/2018-01-16_22-03-42_UVnmBu7k.png
02:04 PM Emil: rue_: in a nutshell ;)
02:05 PM polprog: me_irl
02:05 PM Emil: https://blog.toggl.com/10-customers-tech-support-knows/
02:05 PM Emil: From this
02:27 PM polymorph: ARM offers first clockless processor core https://www.eetimes.com/document.asp?doc_id=1299083 - 2006, and i still don't see any... ;l
02:34 PM polymorph: https://www.hotchips.org/wp-content/uploads/hc_archives/hc18/3_Tues/HC18.S6/HC18.S6T1.pdf
02:36 PM polymorph: ARM996HS Zero (active) standby power
02:48 PM polymorph: tips for devs :) https://en.wikipedia.org/wiki/Asynchronous_circuit
02:54 PM polymorph: https://hackaday.com/2012/10/03/breadboarding-with-a-144-core-processor/
03:01 PM polymorph: SEAforth multi-core processor https://wiki.forth-ev.de/lib/exe/fetch.php/mcv:mcv:seaforth:s40c18_pb080408.pdf
04:34 PM polprog: polymorph: maybe they want to be the only people on the planet to have clockless cpus
04:35 PM polprog: more important question, how fast does it compute...
04:43 PM polymorph: polprog: yeah ;/ the military
04:43 PM polymorph: polprog: 80% of the standard arm, at same die size
04:43 PM polprog: interesting
04:44 PM polprog: in other news im thinking abouy getting a blue pill board (15 pln) and then some bare compatible chips (20 pln/chip at farnell)
04:44 PM polprog: and im curious whether the blue pills have fake chips, farnel is ripping me off, or both of those things
04:45 PM polprog: i havent checked the price at tme but i think it will be similar
04:45 PM polymorph: currently searching for arm lpc1763 in this country, they do not have it
04:45 PM polprog: who?
04:46 PM polymorph: the distributors here
04:46 PM polymorph: they are willing to bring 90-260 pieces minimum
04:46 PM polprog: ouch
04:46 PM polymorph: but i found this lpc1114
04:46 PM polymorph: ;/
04:46 PM polymorph: saad
04:47 PM polymorph: LPC1114FBD48/302
04:47 PM polymorph: not much more than an atmega328p
04:48 PM polymorph: but the price is eve less lol
04:48 PM polprog: i was forced to go to farnell after tme was missing stock on mega8 or 16...
04:48 PM polymorph: you should not mega8
04:49 PM polymorph: the new series has PCINT
04:49 PM polymorph: and lower power/voltage compatible
04:49 PM polprog: ironically a local shop at warsaw that is located literally in an underground passage has them in stock.. but the datecodes were from '12
04:49 PM polymorph: atmega48PA replaces atmega8xxx
04:50 PM polprog: i have m16, m8 and t4313... thanks for the tip - ill have to get some
04:50 PM polymorph: atmega88pa 8k atmega168pa 16k flash atmega328pa 32k
04:51 PM polymorph: i wrote key handling using pcint, it is nonblocking and superfast ;>
04:51 PM polprog: hmm i have a rather big cherry mx key matrix
04:51 PM polprog: cash register replacement part
04:53 PM polymorph: atmega169pa -> LPC1114FBD48/302 hmm well it is even cheaper, and 32 bit cpu
04:53 PM polymorph: *168
04:53 PM polprog: hmm
04:54 PM polymorph: and 12MHz interlan rc osc
04:54 PM polprog: im reading some cortex m3 assmebly tutorials
04:54 PM polymorph: this is m0
04:54 PM polymorph: https://www.nxp.com/docs/en/data-sheet/LPC111X.pdf
04:54 PM polymorph: but i rather want a 1763 because of the processing power
04:55 PM polymorph: PLL allows CPU operation up to the maximum CPU rate without the need for a high-frequency crystal. May be run from th e system oscillator or the internal RC oscillator.
04:55 PM polymorph: ha, so i can pll the internal rc upto 50MHz
04:57 PM polprog: thats faster than i386
04:57 PM polprog: wow
04:58 PM polymorph: haha
04:58 PM polymorph: about 2 euros+p&p
04:59 PM polprog: what
04:59 PM polprog: onlt 2 euros?
04:59 PM polprog: and im sitting here pennypinchin my stm 32 learning kit :(
05:01 PM polprog: i guess with openocd it doesnt matter if ots stm32 or some nxp thibg
05:01 PM polprog: thing*
05:01 PM polprog: haha
05:04 PM polymorph: polprog: yeah
05:05 PM polymorph: you buy at least 10 of these and play for weeks
05:05 PM polprog: thats how i learnt avrs
05:06 PM polymorph: hm this does not support watch crystals i think ;/ i would wanted to async timer it, or pll core clock up from it
05:06 PM polprog: worst case just use a crystal driver and an external timer/counter :(
05:06 PM polprog: like the old 4700 days :P
05:07 PM polymorph: on an fpga i could hook up o watch crystal to any port i think and set up an inverter
05:07 PM polymorph: polprog: nah it has interrupts, at most you need 1 logic gate to drive a watch crystal
05:08 PM polprog: i saw once that a "crystal driver" is just two inverters
05:08 PM polprog: and some stuff.
05:09 PM polprog: actually i have some 4700 chips. might as well play with the crystals i soldered off from junk
05:12 PM polymorph: polprog: check this out ;> https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/lpc-cortex-m-mcus/lpc1700-cortex-m3/256kb-flash-64kb-sram-no-can-lqfp100-package:LPC1763FBD100?fsrch=1&sr=1&pageNum=1
05:14 PM polprog: so many goodies
05:18 PM polymorph: for about 5 eur
05:18 PM polymorph: and 100 pins, it looks enough for a decent size project
05:20 PM polprog: 100 pins
05:20 PM polprog: golly gee
05:20 PM polprog: what do i do with a hundred pins
05:23 PM polymorph: polprog: led matrix display, keyboard, adc inputs, datacom
05:23 PM polymorph: crystal lcd without driver lol :)
05:24 PM polprog: haha
05:24 PM polprog: 8x8 matrix without multiplexing lol
05:24 PM polymorph: 8x8 matrix digits are connected 8 + 8 already for example
05:25 PM polymorph: but you line up 8 digits and you need 64+8 ports
05:27 PM polymorph: polprog: you would love this: The LPC17xx contain a single 12-bit successive approximation ADC with eight channels and DMA support.
05:28 PM polprog: mmm
05:28 PM polymorph: +1 10-bit DAC
05:28 PM polprog: yeah i saw DMA on literally everything while browsing stm datasheets
05:30 PM polymorph: i think i could make a raid sd card usb pendrive from this
05:30 PM polymorph: 100MHz 32 bit arm is kind of powerful
05:31 PM polprog: sweet
05:31 PM polprog: i cant wait to be back home at the bench !
05:42 PM polymorph: polprog: i have used atmea168pa with an asynchronous 32768Hz xtal from an old motherboard btw :) the core was clocked by the default 8MHz internal RC osc, and i used the 32768Hz watch clock to measure time
05:43 PM polymorph: it had less than 5s drift / day
05:43 PM polprog: thats exactly what im using in my desk clock
05:43 PM polymorph: hehe
05:43 PM polymorph: cool
05:43 PM polymorph: i have a bad alarm clock with supercool huge red digits :(
05:43 PM polymorph: i should really hack it
05:44 PM polprog: this reminds me to redo the PCBs for it... i can do it here since ive got a laptop with me
05:44 PM polymorph: who needs pcb ;>>
05:44 PM polymorph: grab some ide cables and connect it
05:45 PM polymorph: ground every second pin and it will be ATA133 rated :>>>
05:45 PM polymorph: i did this with my dapa programmer
05:45 PM polymorph: no capacitive crosstalk
05:49 PM polprog: thats a good idea
05:50 PM polprog: ill keep that in mind when making my jtag adapter
05:52 PM polymorph: btw there are usb hardware and ethernet versions, i avoided them now
05:54 PM polymorph: hm so this lpc1763 thing has an internal pll clock between 275MHz and 550MHz and it divides down clocks from that to internal stuff
06:32 PM polymorph: polprog: i found that if i #1 div 32768Hz by 1, then multiply by 16384 i get 536,870,912 and i divide that by 8 and i get 67,108,864 Hz as cpu clock
06:33 PM polymorph: that is 1024 x 65536
06:35 PM polymorph: a binary timebase
06:36 PM polymorph: and i give a finger to usb
06:41 PM Emil: polprog: how is your led things coming along btw?
06:49 PM polymorph: Emil: you mean that arm is flashing them faster right? :)
06:50 PM polymorph: i don't have arm still yet, but i do have some atmegas
06:58 PM polymorph: Emil: i have created a test board that has an RGB led on it with atmega168pa and a 32768Hz watch crystal :)
06:59 PM polymorph: and a ps/2/usb connection possibility, or something else, and most ports on a header
07:01 PM polymorph: i did drive multiplexed 7 seg+dp led digits with it already, it was cool
07:01 PM polymorph: i need hundreds of digits next and port extensions for a few prototypes
07:03 PM Emil: polymorph: No I meant polprog
07:03 PM Emil: :D
07:03 PM polymorph: Emil: 595s are blazingly fast btw ;>
07:04 PM polymorph: removed delays from dataclock functions at 8MHz cpu freq and they were fine with that too
07:38 PM polymorph: Emil: have you used an arm yet?
07:39 PM polymorph: i was thinking about now if i can use the watch crystal to trigger an interrupt instead of the 1s interrupt to get a higher frequency accurate timebase
07:40 PM polymorph: if i can't find a solution i might connect rtcx2 to another pin for external interrupt lol
08:13 PM rue_: http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html
09:56 PM _ami_: polymorph, i used arm a bit.
09:56 PM _ami_: but i like avr more. since its easier to understand and program.
09:57 PM _ami_: and AVRs DS are so nice.
09:57 PM polymorph: _ami_: i found a cool device called lpc1763FBD100
09:57 PM polymorph: https://www.nxp.com/docs/en/user-guide/UM10360.pdf?fsrch=1&sr=2&pageNum=1
09:57 PM _ami_: STM32 DS are just voluminous :/
09:58 PM polymorph: it is nxp
09:58 PM * _ami_ checking
09:58 PM polymorph: i think i figured out a hack to make it super cool for precision timing
09:58 PM _ami_: polymorph, did u buy the board?
09:59 PM polymorph: nah
09:59 PM polymorph: i only buy chips
09:59 PM _ami_: :)
09:59 PM polymorph: i design and make boards
09:59 PM _ami_: oh its CM3
09:59 PM polymorph: y
09:59 PM polymorph: it is about 5 euros
09:59 PM polymorph: 100MHz 100 MIPS maybe
10:00 PM polymorph: 32 bit with 12 bit adcs, and a dac
10:01 PM _ami_: nice
10:01 PM polymorph: i plan to put 32768Hz xtal on it, then hardwire it to SysTick external input
10:02 PM _ami_: do you plan it to use as a clock to other ICs?
10:02 PM polymorph: no, but it will be able to time
10:03 PM polymorph: turn on off stuff, reflow oven, and be a nice alarm clock if needed
10:03 PM _ami_: aha,
10:03 PM _ami_: ok
10:03 PM _ami_: i think it has MCO feature also.
10:03 PM polymorph: it has 4MHz internal RC osc, and adjustable PLL so it can run from that
10:04 PM _ami_: http://embedded-lab.com/blog/stm32-internals/
10:04 PM polymorph: (or external xtal 1-25MHz)
10:05 PM _ami_: stm32 has the same thing
10:06 PM _ami_: one thing which i like abt stm32s is that how easy clock can be configured.
10:06 PM _ami_: https://github.com/amitesh-singh/FASTUSBasp/blob/master/src/main.c#L40
10:07 PM polymorph: they want to sell that so bad but i think lpc is better
10:07 PM polymorph: also this has a dac too.
10:07 PM _ami_: stm32 has DAC too. :D
10:07 PM polymorph: lol does it
10:07 PM polymorph: 1 channel?
10:11 PM _ami_: no
10:11 PM _ami_: more than that.
10:12 PM _ami_: one sec, let me check
10:12 PM _ami_: two
10:13 PM polymorph: if i had to decide between 2 i would choose the one with more features that are meaningful, and more reliability for example -55°C to 125°C operation
10:16 PM _ami_: it has three.
10:16 PM _ami_: Channel1,2 and channelD
10:16 PM _ami_: i don't know what is channelD
10:16 PM _ami_: i have not done anything on DAC yet.
10:16 PM _ami_: its unexplored domain for me.
10:20 PM polymorph: you got me thinking dude i remember i bought STM opamps because not only they were rated - 40°C to 105°C but they were cheap too
10:20 PM polymorph: can you simply OPENOCD those too?
10:24 PM _ami_: yes, you can.
10:24 PM _ami_: or use BMP
10:24 PM _ami_: you can make one BMP out of those blue pills aka stm32f103c8t6
10:28 PM _ami_: i use openocd to program it over 64kb ;) https://github.com/amitesh-singh/FASTUSBasp/blob/master/cmake/stm32-toolchain.cmake#L104
10:29 PM _ami_: you would need that in case you want to make it BMP. (BMP firmware size > 64Kb)
10:32 PM polymorph_: that last link hung my iceweasel shitbrowser
10:33 PM _ami_: polymorph_, https://github.com/libopencm3/libopencm3-examples/blob/master/examples/stm32/f1/stm32vl-discovery/adc-dac-printf/adc-dac-printf.c
10:34 PM _ami_: there is a nice exmaple on doing DAC on stm32f1.
10:38 PM _ami_: i did some adc programming on stm32f1, but did not go too far.
10:38 PM _ami_: but AFAIK, i has nice ADC capabilities.
10:38 PM _ami_: it*
10:39 PM _ami_: polymorph_, https://www.enlightenment.org/ss/e-5a5ed346228af0.89649237.jpg
11:29 PM polymorph_: back :)
11:29 PM polymorph_: _ami_: thank you very much for pointig out this, i found stm arms at a distributor ;)
11:30 PM polymorph_: they seem to be popular
11:39 PM polymorph_: _ami_: i can directly replace atmega328pa with this right? :) STM32F100C8T6B
11:39 PM day__ is now known as day
11:39 PM polymorph_: i think i meant the LQFP48 version
11:53 PM polymorph_: we have a winner ;> https://cdn.sos.sk/productdata/54/e4/d22eb66f/stm32f373cct6.pdf
11:54 PM polymorph_: lol this has everything i expected to have
11:55 PM polymorph_: and it is able to operate from -40 to 105°C