#avr | Logs for 2015-10-08

Back
[04:26:58] <FrankD> hey, has anyone here implemented bandpass filters?
[04:27:03] <FrankD> in software?
[04:27:57] <Mr_Sheesh> z plane transforms, but on 80x186'es
[04:29:55] <FrankD> eh M3 has no FPU :\
[04:30:02] <FrankD> wtb Cortex M4 AVR :P
[04:56:57] <Mr_Sheesh> Fixed point math lets you go without a FPU; same on the 80x186's
[04:57:15] <Mr_Sheesh> there is an IEEE standard for it
[05:06:30] <Roklobsta> take the time to learn fixed point maths. it's worth it.
[05:28:23] <FrankD> yeah i realize that
[05:28:28] <FrankD> but not accelerated instructions
[05:28:33] <FrankD> ie for FFTs/FIRs
[05:32:15] <Lambda_Aurigae> for that you need a dsp chip.
[05:32:20] <Lambda_Aurigae> or a high speed processor
[05:35:49] <Lambda_Aurigae> I think the xmega has dsp functionality.
[07:15:14] <osteri> FrankD: yes it's possible, calculate FIR/IIR values in matlab/octave and export the values, you don't need to calculate FFT in AVR
[07:18:22] <osteri> i think this is something to begin with: http://people.ece.cornell.edu/land/courses/ece4760/Math/avrDSP.htm
[07:19:52] <osteri> those DSP things are hard to understand, for me at least, it helps if you know how to calculate analog filters
[07:45:20] <LeoNerd> Slightly offtopic question, but: if I have some resistors and a fixed-gain current shunt amp, that all claim "1%" accuracy... am I right in thinking that's a measure of how accurate the /value/ is quoted on them? That its true value will be a lot more repeatable than 1%, but they just don't claim an exact value for it?
[07:45:52] <LeoNerd> Effectively what I'm asking is: can I make a system that's better than 1% accurate, if I put a calibration tuning pot into it, and adjust it manually while measuring it? Will it be better than 1% and repeatable if I do that?
[07:57:54] <Jartza> btw. is there any other difference in hvsp compared to isp than instead of pulling reset down, it's pulled high to +12V?
[07:58:50] <LeoNerd> HVSP can do a few tricks that ISP can't... namely those extra fuse bits
[07:59:09] <LeoNerd> ISP can't disable SPIEN
[07:59:38] <LeoNerd> It's also an entirely different protocol over the wire
[08:00:04] <LeoNerd> Over more wires, for a start. ISP is reset/MI/MO/SCK, HVSP is SCI/SDI/SII/SDO
[08:00:10] <LeoNerd> + reset
[08:03:28] <RikusW> LeoNerd: are you sure you can't disable SPIEN over SPI ? how about RSTDSBL ?
[08:04:06] <LeoNerd> Most of the data sheets have a footnote to the effect that you can't fiddle SPIEN over ISP
[08:04:18] <LeoNerd> The same does not apply to RSTDSBL, thus rendering that safety mechanism pointless ;)
[08:04:44] <LeoNerd> You /can/ fiddle RSDDSBL over ISP, and having done so you now can't put it *back* because you've lost effective ability to perform ISP
[08:06:02] <LeoNerd> Yah; e.g. I'm reading the datasheet for a 328P, and under the fuses it lists SPIEN with footnote 2. That says: The SPIEN Fuse is not accessible in serial programming mode.
[08:06:53] <LeoNerd> There may be *some* devices you can do that with, but every one I'm familiar with (m328, m88, m32U4, t84, t841, t85) does not
[08:22:07] <RikusW> JTAGEN can be turned off over JTAG, for m128 at least
[08:22:41] <Jartza> so, how about TPI?
[08:32:42] <RikusW> you can disable reset, and need a HV TPI (12V on reset) to re-enable it.
[08:33:10] <RikusW> Atmel should've made ISP respond to 12V on reset as well....
[08:34:25] <Jartza> yeah well
[08:34:28] <Jartza> I have TPI programmer
[08:34:39] <Jartza> but I would need to disable reset
[08:34:39] <Jartza> d'oh
[08:34:59] <Jartza> I was just wondering, can I just drive 12V through fet and get signal from reset pin :)
[08:36:49] <RikusW> Tom used a ST662 for that
[08:44:35] <Jartza> ahh
[08:57:35] <LeoNerd> Yah; there's some special 5V->12V chargepump chips for doing this
[08:57:51] <LeoNerd> I use an LTC equivalent to the 662 'cause it's cheaper :)
[08:58:16] <LeoNerd> https://www.tindie.com/products/leonerd/avr-hvsp-programming-bus-pirate-adapter/?pt=full_prod_search
[09:26:16] <Jartza> I might have ltc charge pump somewhere
[09:26:30] <Jartza> 1362 iirc
[09:27:19] <Jartza> no it wasn't. can't remember the number.
[09:27:26] <Jartza> have to check when I get home
[11:16:39] <inkjetunito> good evening
[11:17:36] <inkjetunito> anyone happen to know what the supply voltage tolerance of consumer products is in europe and where it is defined?
[11:26:55] <LeoNerd> I'm not quite sure I get the question
[11:27:23] <sebus> inkjetunito u mean voltage from wall socket or wut?
[11:30:23] <Jartza> ouch
[11:30:29] <Jartza> I have stk600
[11:30:36] <Jartza> but it just fails to program my attiny5 chips :(
[11:30:58] <Jartza> I seem to have olimex avrisp mk2 but it's lacking of course the high voltage programmer (tpi)
[11:31:07] <Jartza> I was wondering if I can turn it into one easily
[11:31:25] <Jartza> I have 12 powers and transistors and fets and stuff, so I guess it should be possible
[11:31:33] <Jartza> the biggest problem being, I need it now
[11:32:09] <sebus> avr isp mkII can do TPI iirc
[11:32:10] <sebus> http://www.atmel.com/webdoc/avrispmkii/avrispmkii.section.phf_vsd_lc.html
[11:32:56] <Jartza> yes, it can do tpi
[11:33:08] <Jartza> but the attiny5 has reset disabled
[11:33:14] <sebus> then u need stk600
[11:33:19] <Jartza> so I need high voltage for the reset pin
[11:33:27] <Jartza> well, the stk600 seems to be just the big fail
[11:33:50] <sebus> http://www.atmel.com/webdoc/stk600/stk600.programming_tpi.html
[11:33:54] <sebus> it says it can...
[11:34:08] <sebus> i use cheap usbasp and mk2/dragon
[11:34:15] <sebus> but only for some m88s and such
[11:34:59] <Jartza> in osx and avrdude, all I get is avrdude: stk500v2_recv_mk2: error in USB receive
[11:35:32] <Jartza> and in windows, this: https://i.imgur.com/CpMmddo.png
[11:35:41] <Jartza> everything is connected according to manual
[11:35:58] <Jartza> I have the "piggyback" card for attiny4/5/9/10 on it
[11:36:42] <Jartza> even tried updating the firmware to it (which worked fine)
[11:36:45] <sebus> anyway, got a question guys -> i need a very small PLD for my custom hardware that'll be able to repsond to 40-50MHz signals; someone pointed me to ATF22V10, still can be found but heh, how to write a code or draw logic for it?
[11:37:29] <Jartza> and tpi programming and "high-voltage tpi" are very similar, only difference is in reset (if I read right)
[11:37:45] <sebus> ye, HVprogramming applies 12V to reset pin
[11:37:55] <Jartza> chip is either kept reset low or +12V
[11:37:57] <sebus> like in standard PIC programmer
[11:44:37] <inkjetunito> sebus: i mean, if i rate my device for 230 VAC, for example, which voltages must it be able to tolerate? the mains voltage in EU is +/- 10%
[11:45:25] <sebus> most SMPS work in wide-range mains
[11:45:32] <sebus> alike 90-260V
[11:46:44] <sebus> just keep that in mind your device should work reliable under such +/- 10%
[11:48:16] <sebus> good SMPS has 400V or 450V rated caps on it's input
[11:59:41] <inkjetunito> sebus: yeah. such devices have made life a lot easier. i might have found where the definitions are; in IEC/EN 6xxxx. thanks for help :)
[12:01:14] <sebus> inkjetunito if you are building yourself PSU, just try to find a datasheet from any power supply available on market
[12:01:26] <sebus> Mean-Well for eg.
[12:01:43] <sebus> Quite a lot of them in industrial or home devices
[15:07:13] <ekaj> Is there an instruction like CPSE (compare, skip if equal) but skip if >not equal?
[15:12:04] <Jartza> hehe
[15:12:06] <Jartza> always fun
[15:12:06] <Jartza> Program: 256 bytes (50.0% Full)
[15:14:12] <Jartza> ekaj: no, you have to use separate compare and branching instructions
[15:15:38] <Jartza> like, first CP and then BRSH (branch if same or higher)
[15:15:40] <Jartza> etc.