#avr | Logs for 2017-01-26

Back
[00:47:54] <rue_house> an ausy holiday everyone gets drunk 4 mins earlier than usual? :)
[00:53:28] <Casper> nahhh can't get drunk faster, they are always drunk!
[00:54:36] rue_house changed topic of #avr to: 8 bit atmel microcontrollers. suggest a hilight for the day to Rue_house. Todays hilight: https://exploreembedded.com/wiki/Dtmf_controlled_robot_using_AVR
[01:01:28] <rue_house> grrrr
[01:01:57] <rue_house> it turn out these 'awesome cutoff digital filters' are just doing fourier breakdown, killing the freqs they dont want, and reconstructing
[01:02:21] <rue_house> WHY DID I BELEIVE THE INSTRUCTORS!
[01:20:45] <mrtejaslol> anyone there
[01:28:03] <jacekowski> rue_house: i thought there was a simpler trick to it
[01:28:17] <rue_house> dunno
[01:28:21] <rue_house> I hate math
[01:29:46] <jacekowski> iirc it could be represented by a single math equation along the lines output = input - previous output or something along those lines
[01:42:26] <rue_bed> not as an 8th order filter
[03:06:57] <_ami_1> sabor: thr?
[03:10:54] <sabor> _ami_1: yep
[03:11:52] <_ami_1> sabor: the digital vernier calippers are good ones? work well?
[03:12:51] <jacekowski> yes
[03:13:06] <jacekowski> all work on same principle which makes them really cheap and amazingly accurate
[03:13:11] <_ami_1> jacekowski: cool.
[03:13:14] <sabor> _ami_1: i prefer analog ones, the battery will never be empty
[03:14:58] <_ami_1> i remember using analog ones at college .. but never used them afterwards.. but i need them now to measure my components before making footprints
[03:15:32] <sabor> no need to measure, just look into the datasheet :)
[03:17:22] <sabor> _ami_1: i bought something like this a while ago: https://www.aliexpress.com/item/-/32767940760.html
[03:18:26] <sabor> digital are twice the price, have an empty battery when you need it most, and a digital thing without an interface doesn't make sense to me :)
[03:18:52] <jacekowski> sabor: its a lot faster to read than analogue one
[03:19:21] <sabor> yeah, that's the the only advantage
[04:25:59] <Gerritjan> im trying to understand the behavior of the ports but if i use DDRC all ports of PC.. will be selected or can i select a single port
[04:26:38] <Emil> Gerritjan: what are you trying to achieve?
[04:27:03] <Gerritjan> euhm first a simple tutorial turn on led or off
[04:27:14] <Emil> Gerritjan: https://emil.fi/avr
[04:27:18] <Gerritjan> but i like to learn to use a single port to
[04:27:20] <Emil> There you go
[04:27:53] <Emil> Gerritjan: A pin is a single entity. A port controls many pins simultaniously
[04:28:29] <Gerritjan> oek but DDR is a row registering to right?
[04:28:35] <Emil> Most AVRs are 8 bit, their registes are thus 8 bit and each bit in those relevant IO registeres directly controls a single pin
[04:28:57] <Emil> Read the tutorial, the code is commented
[04:29:25] <Gerritjan> oke thx i will :D
[04:29:47] <Emil> DDRX is the data direction register, what pins on that port are input and what are output
[04:30:30] <Emil> PORTX is the actual value at the pins. If you set a pin to output, the corresponding bit at PORTX controls the voltage at the pin
[04:30:50] <Emil> If input, it selects if the internal pullups are used
[04:31:08] <Emil> PINX is where you can read the actual value at the pin
[04:32:00] <Gerritjan> oke thx now i do understand a little bit of the pin registration :D and use bit to set the correct pin :D
[04:32:26] <Emil> you can also use PINX to toggle the PORTX values, it is a shortcut that the designers left us: that is we don't need to user ^= and the generated assembly but just ldi, write is necessary
[04:32:43] <Emil> Gerritjan: the linked tutorial should help you through
[04:33:04] <Gerritjan> Emil: why do you use a method for the delay in the page because you can use straight away like _delayms(500);
[04:33:29] <Emil> ...
[04:33:44] <Emil> Gerritjan: you should read the code first
[04:33:55] <Emil> The comments
[04:34:04] <Gerritjan> yes im dooing it now :d
[04:34:11] <Gerritjan> did not see it sorry
[04:34:18] <Emil> Gerritjan: also they are functions, not methods
[04:34:24] <Emil> There is a difference
[04:34:37] <Gerritjan> blush :D
[04:36:50] <Emil> Gerritjan: did you find out why I use vdelay there?
[04:37:34] <Gerritjan> not yet im learning the code good im now @ the part registering pins as output and input
[04:38:50] <Gerritjan> effect from slow and set it to high
[04:38:57] <Gerritjan> high = fast
[04:39:31] <Emil> ?
[04:39:49] <Gerritjan> Because I wanted to say overflow instead of underflow and want the effect to go from slow to fast.
[04:42:11] <Emil> You can try the code on any atmega328p arduino, too
[04:42:13] <Emil> If you have one
[04:42:19] <Emil> No need to use a barebones version
[04:43:27] <Emil> In the case of programming through a serial bootloader, the avrdude command is avrdude -c arduino -P PORT -b BAUDRATE -p atmega328p -e -U flash:w:file:i
[04:44:03] <Emil> Or
[04:44:38] <Emil> you can just copypaste the code directly to the arduino ide (and change the f_cpu to 16000000UL
[04:44:41] <Emil> )
[04:46:23] <Gerritjan> i have Arduino mega
[04:53:55] <Gerritjan> Emil is there a way to make it with a make file
[05:43:09] <tunage> does avr flash drones? I've only used it for arduino boards. I have a walkera drone that needs flashing.
[05:55:59] <Gerritjan> i just maked a make file http://pastebin.com/zXeJineU and now im getting the error makefile:2: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
[06:06:24] <Lambda_Aurigae> tunage, your question is,,,,missing something...
[06:06:46] <Lambda_Aurigae> avr is a brand of microcontrollers....I suppose an avr could be programmed to flash a specific drone....
[06:10:29] <twnqx> Gerritjan: when you indent a makefile, for example to put the rules, you HAVE to have tabstops, and not 8 blanks. using the spacebar will not work.
[06:11:15] <Lambda_Aurigae> and your editor has to insert tabs, not spaces.
[06:11:38] <Lambda_Aurigae> make is very picky about some things like that.
[06:13:48] <Gerritjan> im trying to make the L led turn on and off with avr code i know that the PB7 is connected to the led but i did learned some things from Emil site and i have some code maked with some other settings but still no on or off and this is the code: http://pastebin.com/HLFswfea
[06:15:32] <Lambda_Aurigae> kick your delays up to 1000....and change the maths in the PORTB lines to PORTB=0; and PORTB=1;
[06:15:36] <Lambda_Aurigae> just to simplify.
[06:15:54] <Gerritjan> oke ill try
[06:17:12] <Gerritjan> And stil no reaction
[06:18:10] <Gerritjan> Do i need to change the code DDRB = 0b10000000;?
[06:19:00] <Lambda_Aurigae> make it PORTB=255;
[06:19:06] <Lambda_Aurigae> just to turn all the pins on.
[06:19:15] <Gerritjan> oke ill try that
[06:19:15] <LeoNerd> 0xFF usually makes the intention clearer
[06:19:18] <Lambda_Aurigae> I missed the PB7 bit up there.
[06:19:32] <Lambda_Aurigae> I saw it as PB1 and totally zoned that 1 is not PB1...sorry.
[06:20:13] <Gerritjan> normaly it needs to work?
[06:21:04] <Lambda_Aurigae> well, having no clue as to your physical setup or anything, it should work.
[06:21:09] <Gerritjan> because i did put PB7 to output
[06:36:19] <Gerritjan> ah i see that the led turn on once but not in een cycle
[06:36:34] <Gerritjan> so there is something wrong with the while loop
[06:46:14] <Lambda_Aurigae> well.
[06:46:27] <Lambda_Aurigae> your delay won't go beyond 255 really.
[06:46:33] <Lambda_Aurigae> using uint8_t
[06:47:07] <Lambda_Aurigae> again, I missed that when I told you to go to 1000 with it....
[06:47:14] <Lambda_Aurigae> too early for me to be reading code this morning.
[06:49:22] <Gerritjan> hahaha oke
[06:57:26] <Gerritjan> Lambda_Aurigae: is it better to use a external led to test?
[06:58:03] <Lambda_Aurigae> external?
[06:58:10] <Lambda_Aurigae> didn't know an avr had an internal led
[06:58:22] <Gerritjan> no to connect a external led
[06:58:37] <Gerritjan> because im programming a Arduino Mega with avr code
[06:58:42] <Lambda_Aurigae> again, has to be an external led because an avr doesn't have an internal led
[06:58:48] <Lambda_Aurigae> oh...I know nothing about ardweeny
[06:59:11] <Gerritjan> no im using the AtMega2560
[06:59:20] <Lambda_Aurigae> I will leave anything further on arduino to someone else.
[06:59:51] <Lambda_Aurigae> mainly because I have to go to work now...and I dislike ardweeny
[06:59:54] <Gerritjan> hahah oke i do like to program the ATmega chip only i dont know how :s
[07:00:01] <Gerritjan> hahah oke
[07:00:08] <Gerritjan> good day
[07:26:58] <Emil> Gerritjan: remeber that my code wprks because iy toggles
[07:27:15] <Emil> If you turn on and off in a loop you have to have twodelays
[07:28:01] <Emil> And incase you didnt figure out why I used the vdelay was because the _delay_ms rtc dont accept variables but consnrants
[07:28:23] <Emil> Gerritjan: also if you have feedback on the guide please tell me
[07:31:17] <Gerritjan> i will im trying some code but still with out a button and trying to turn on led on pb7 is not working
[07:31:55] <Gerritjan> im trying now with a external led with a 300ohm and still no on and off
[07:33:07] <Gerritjan> Emil: http://pastebin.com/CV3gNTjv
[07:33:08] <Emil> Gerritjan: and
[07:33:20] <Emil> the led on avr boards is on PB5 most od the time
[07:33:24] <Emil> sorry
[07:33:27] <Emil> arduino boards
[07:34:34] <Emil> Gerritjan: drop the vdelay if you are not using variable delays
[07:35:03] <Emil> If you are using things like vdelay(1000) just dont :D
[07:35:18] <Gerritjan> nah im using 255 max
[07:36:46] <Gerritjan> but why doesnt it start because i know that with arduino code pin13 the led is connected on
[07:37:56] <Gerritjan> Emil: On the UNO, MEGA and ZERO it is attached to digital pin 13
[07:39:26] <Emil> Did you check the pinout?
[07:39:40] <Gerritjan> yes
[07:39:44] <Emil> and umm
[07:39:48] <Emil> you are turning on pb6
[07:39:49] <Gerritjan> PB7
[07:39:49] <Emil> not pb7
[07:40:09] <Emil> On both places
[07:40:25] <Emil> So replace pb6 with pb7
[07:40:27] <Gerritjan> Yes i have a external led now on PB6 and same not turning on or off
[07:40:49] <Emil> Is the led right way on?
[07:41:01] <Gerritjan> nope
[07:41:02] <Emil> Does the led work at all?
[07:41:07] <Gerritjan> nope
[07:41:16] <Emil> ...
[07:41:19] <Emil> Mate
[07:41:19] <Gerritjan> only if i give i 5v right away
[07:41:29] <Emil> there you go, thansk
[07:41:36] <Gerritjan> :D
[07:41:53] <Emil> And if I ask if the led is right way on, answering with nope means you have set it up wrong
[07:41:56] <Emil> ;)
[07:42:07] <Emil> Aleighty
[07:42:16] <Emil> Change the pin and do PORTB=255
[07:42:23] <Emil> AND DDRB=255
[07:42:27] <Gerritjan> oke
[07:42:37] <Emil> `oh
[07:42:39] <Emil> and also
[07:42:41] <Emil> umm
[07:42:52] <Emil> well
[07:42:53] <Emil> notjonf
[07:43:49] <Gerritjan> 1 PORTB = 255 and 1 PORTB= 0;?
[07:44:14] <Emil> What board are you using?
[07:44:27] <Emil> And what are you using to rogram it?
[07:44:28] <Gerritjan> Mega2560
[07:44:42] <Emil> No but what arduino board
[07:45:04] <Gerritjan> codeblocks and compile avr-gcc upload avrdude . Yes Arduino
[07:48:57] <Emil> Gerritjan: emil.fi/jako/blink.c
[07:49:07] <Emil> Upload that
[07:49:08] <Gerritjan> Emil: http://pastebin.com/S16dCxBQ
[07:49:09] <Emil> Oh
[07:49:14] <Emil> And add the fcpu
[07:49:25] <Gerritjan> in the code?
[07:50:22] <Emil> Where are you specifying what code to upload?
[07:50:46] <Emil> https://emil.fi/jako/acr
[07:51:06] <Emil> chmod +x acr
[07:51:36] <Emil> ./acr blink.c atmega2560 "arduino -P PORT -b BAUD"
[07:54:10] <Gerritjan> Emil: that acr code is not working
[07:54:12] <Gerritjan> :s
[07:54:18] <Emil> Arw you ok linux?
[07:54:47] <Gerritjan> yes
[07:54:51] <Gerritjan> debian
[07:54:57] <Emil> What does it say?
[07:55:14] <Gerritjan> and im getting errors that why i use that code whats @the bottom of my pastebin
[07:55:31] <Emil> Yeah it is not commented oit
[07:56:06] <Gerritjan> :d i know
[07:56:23] <Emil> Just take that blink.c I linked and upload using that acr script and with those commands I gave you
[07:56:25] <Gerritjan> but thats the code i use the avrdude part is from Arduino studio
[07:56:36] <Emil> (also read the script first so that you can trust it)
[07:56:42] <Emil> Gerritjan: ...
[07:56:51] <Gerritjan> yes
[07:56:54] <Emil> You are not supposed to have code like that at the c file you compile :D
[07:57:00] <Emil> Move it to another file:D
[07:58:12] <Gerritjan> Emil: http://pastebin.com/2ZLnDxSf
[07:58:48] <Emil> What command did you run
[08:01:01] <Gerritjan> ./acr main.c atmega2560 "arduino -P /dev/ttyUSB0 -b 115200"
[08:01:29] <Gerritjan> now im getting avrdude: stk500_recv(): programmer is not responding
[08:01:29] <Gerritjan> avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
[08:20:25] <Emil> Well
[08:20:37] <Emil> Are you in the dialout group?
[08:20:53] <Emil> I really have no idea about your hardware setup
[08:29:01] <Gerritjan> Emil: well i have the problem when i use your code with arduino studio i works
[08:29:24] <Gerritjan> And if i use the compile and upload in terminal i doesnt
[08:31:33] <Gerritjan> Emil: this is the upload log from arduino studio http://pastebin.com/J08ZEf49
[08:35:13] <Gerritjan> brb
[08:35:58] <Emil> Well
[08:36:06] <Emil> Use the -c wiring
[08:36:46] <Emil> /usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -v -v -v -v -patmega2560 -cwiring -P/dev/ttyUSB1 -b115200 -D -V -Uflash:w:/tmp/build641801430540535637.tmp/sketch_jan26a.cpp.hex:i
[08:42:19] <Gerritjan> Emil: ill make a log from the compile and upload from the |Arduino studio because it works if i use to compile and upload it
[08:52:50] <Gerritjan> Emil: it works with your arc code and the led is blinking :D
[08:58:59] <Emil> What did you change?
[09:00:18] <Gerritjan> euhm did add a -D to is and it did upload it good
[09:00:27] <Gerritjan> and used wiring not arduino
[09:00:58] <Emil> Well, it works then!
[09:01:03] <Emil> Good job : )
[09:01:41] <Gerritjan> yes now i have to learn some stuff before my robot comes
[09:02:50] <Gerritjan> a 17 DOF Robot so i need to learn how to use the output right for the servo`s and input to the chip because im using Raspberry pi for the movement and other stuff
[10:13:29] <_ami_> sabor: ordered pcbs from https://oshpark.com ?
[10:13:57] <_ami_> seems like this is the only one which understands kicad_pcb well :)
[10:14:03] <Chillum> I have, good quality
[10:14:04] <_ami_> seems cheap to me as well.
[10:14:15] <Chillum> cheap for small amounts, for larger orders there are better deals
[10:14:27] <LeoNerd> They're very nice for one-offs
[10:14:45] <LeoNerd> Good for prototyping, but yes if you want a larger run of lots of boards, there's cheaper places
[10:14:46] <_ami_> Chillum: i needed 3 boards only.. so yeah its good.
[10:14:48] <Chillum> 3 offs
[10:14:54] <LeoNerd> 3 is the new 1
[10:14:58] <Chillum> hehe
[10:15:13] <Chillum> I always lose one, and mess up another so 3 is perfect for me
[10:15:36] <_ami_> any idea why dirtypcb has trouble in understanding gerber files from kicad?
[10:15:49] <LeoNerd> I've not had that trouble before
[10:16:19] <_ami_> may be i am doing something wrong in settings before PLOT
[10:16:32] <LeoNerd> See what gerbv makes of it
[10:17:14] <_ami_> Chillum: LeoNerd: oshpark is based in USA?
[10:17:29] <Emil> _ami_: you are probably doing something wrong
[10:17:29] <LeoNerd> Yah. But they ship to anywhere
[10:17:49] <Chillum> I think so
[10:32:41] <Emil> But yeah
[10:32:44] <Emil> oshpark is good
[10:32:53] <Emil> Price point is pretty good
[10:33:11] <Emil> Delivery time was ~25 days for me, to Finland
[10:33:54] <_ami_> Emil: good to know. delivery should be 25 to 30 days to india
[10:34:10] <_ami_> sabor might be knowing if he ordered from oshpark before
[10:34:39] <_ami_> excited to place first pcb order!! and that would be oshpark! :D
[10:34:47] <rue_house> canada post is backlogged 60 days+
[10:34:54] <_ami_> rue_house: :/
[10:35:12] <_ami_> why 60 days? canada is too close
[10:35:21] * _ami_ wonders..
[10:35:34] <rue_house> they are apparently trying to curb drugs
[10:35:49] <rue_house> so they prolyl have 2 people checking all the packages comming into canada
[10:38:00] <Chillum> lol
[10:38:22] <rue_house> arg, since when is it ok for a dns server to take over 250ms to reply?
[10:38:42] <Chillum> canada post is just underfunded and overwhelmed
[10:38:53] <Chillum> will be recovering from xmass till Feb
[10:39:14] <rue_house> I'm sure if half the money the CEO makes was put to WORKERS things would prettymuch be resolved
[10:40:37] <Chillum> he gets a half millions, that is not going to make much of a difference in an organization with 64,000 employees
[10:40:49] <Chillum> that is only $7.80 per employee
[10:41:12] <Chillum> not even enough to buy them pizza
[10:41:22] <rue_house> hmm, what if his kickbacks are included in that number?
[10:41:39] <Chillum> kickbacks are by definition not included
[10:41:51] <rue_house> convienient
[10:42:32] <Chillum> the population density of Canada is so low that our actual cost of postal service is much higher than other countries
[10:42:51] <Chillum> so much land to cover
[10:43:36] <rue_house> hmm wonder how long it takes a train to get across
[10:43:42] <rue_house> 4 days?
[10:43:52] <twnqx> depends on the train :P
[10:45:07] <Chillum> I don'
[10:45:11] <rue_house> do you think webpages would expire at any higher a rate if we all used ip addresses directly instead of domain names?
[10:45:22] <Chillum> t have the numbers but I can't imagine the trains cover most of Canada's population
[10:45:43] <rue_house> esp since the whole system was prettymuch derailed
[10:46:02] <rue_house> seems we just use planes now
[10:46:14] <Chillum> the trains around here have been decommissioned and the tracks are growing over
[10:46:22] <rue_house> yea
[10:46:35] <rue_house> its not fast, but its cheap
[10:46:49] <rue_house> pretty sure trains are still cheaper than planes
[10:46:53] <Chillum> I used to live near a corner on the tracks where the train slowed down. I used to hop on and let it take me to town
[10:47:11] <Chillum> onto the side that is
[10:47:17] <rue_house> yup
[10:47:30] <rue_house> I used to live by tracks in vancouver
[10:47:40] <Chillum> had to check the schedule to make sure it stopped there or I would end up holding on for another 2 hours lol
[10:55:52] <rue_house> ok, namebench is having quite a time of this.... I'll go do something else
[11:01:10] <rue_house> hahahahahaha
[11:01:14] <rue_house> Google Public DNS-2 is
[11:01:14] <rue_house> 1594.2%
[11:01:14] <rue_house> Faster
[11:01:14] <rue_house> than your current primary DNS server
[11:02:36] <rue_house> poooo, my routers dns it taking, on average, 842ms to answer
[11:03:07] <rue_house> ooo and google is hijacked
[11:16:20] <sabor> _ami_: $60 for (almost) 10 PCBs 5*5cm at oshpark, pretty expensive
[11:18:56] <sabor> plus another 25$ or more for shipping
[11:19:14] <hetii> Hi :)
[11:20:27] <bss36504> sabor: That's a hell of a deal, minus the shipping part.
[11:20:54] <bss36504> but per square unit they are really well priced, especially considering the quality of the board
[11:21:17] <bss36504> Good luck getting 13mil vias and ENIG at any other prototype service at that price point.
[11:21:57] <hetii> Q: any clue if one AMS1117-3.3v in SOT-223 will have enough power to handle atmega8, NRF24l01+, 3 mosfet gate and moc3022 ? Maximum input voltage can be even 12v
[11:22:02] <sabor> i never had any troubles with my chinese friends, but i don't need anything special...
[11:22:22] <hetii> and wonder if add separate LDO for atmega and separate for NRF.
[11:22:57] <bss36504> hetii: Yeah I'd say so. It's a 1A regulator.
[11:23:17] <bss36504> But your best bet is to tally up current consumption, do a quick power calculation.
[11:23:30] <bss36504> (Vin-vout)*I
[11:27:41] <hetii> from doc that I find nrf consume 12mA atmega around 4mA but this is for 4Mhz and 3v not sure about maximum rating at 5v. moc3020 let say 20mA as well as two leds in board. so till now 36mA not sure about rest components.
[11:27:53] <bss36504> hetii: Atmega8: 20mA, NRF24l01+: 13mA, Mosfet gates: 0mA, moc3022: (guessing) 10mA = 43mA total. (12-3.3)*0.043 =374mW dissipated from the regulator. Seems pretty reasonable for a SOT223 LDO. Note that this regulator needs a minimum of 5mA current draw to remain stable
[11:28:16] <bss36504> I rounded up and added safety margins on the current numbers, btw.
[11:29:00] <bss36504> Read the applications section of the AMS1117 to figure out the appropriate copper area
[11:29:09] <bss36504> But just using intuition I'd say that regulator will be fine.
[11:29:53] <hetii> well I also wonder if make any sense to provide 5v to atmega when it can work fine at 3v3
[11:30:29] <hetii> I want to build more or less universal IoT board with it and wonder if will need 5v there
[11:30:30] <bss36504> sabor: Im sure, i wasn't dissing the other providers, just saying that OSHPark provides an amazing quality and truly impressive specs, for the price point.
[11:30:44] <bss36504> hetii: I mean, sure you could power it at 5V, so long as everything else can be powered at 5V also.
[11:30:57] <bss36504> That would reduce the power dissipated by the regulator, at the very least
[11:32:38] <hetii> the point is that sometimes I will use that board in project where I use 12v (for eg RGB strip leds) sometimes just 5v (for eg. as a ligth dimmer or some sort of sensors board)
[11:35:19] <hetii> ok I need to go now, and back in few hours.
[11:35:26] <bss36504> Well then you need to evaluate the design at both ends of the spectrum. Define your operating conditions, do the math, select components as appropriate and repeat as necessary.
[11:35:54] <bss36504> But also, this isn't particularly complex or challenging, as in, you won't have trouble finding a suitable regulator
[11:48:27] <carabia> can't be that hard, jesus polak fucks are stupid, hetii
[11:50:27] <carabia> i just like how people insist on using linear regs for applications that would seemingly not have any drawbacks just going with an smps
[11:52:09] <LeoNerd> Switchmode power supplies are "new and scary"
[11:52:12] <LeoNerd> and everyone is afraid of new
[11:52:16] <LeoNerd> .. or something
[11:53:05] <carabia> of course $$, and his application seems low power enough to go with a linear reg, but i don't like the way he's asking whether his 1a reg can drive a small rf chip and an attiny, and a couple of fets??
[11:53:29] <carabia> drive seems like a highly gay word here
[11:54:37] <carabia> in any case he's apparenly spinning some sort of a "project board" that could be used in various applications, so I think he should just go with an smps
[11:55:20] <carabia> when he's back, I for one am going to suggest him to use something ultra-small and stupid, as going small is the theme on the channel!
[11:57:10] <carabia> sot23-5 seems to push 170+ tja c/w, that seems like a good choice for him
[12:02:17] <bss36504> Yeah, back of the envelope calculation puts Tj at Ta+20C at his current requirement
[12:20:29] <_ami_> sabor: its 6$ per 3 boards on oshpark!
[12:21:41] <bss36504> _ami_: 9 5cm x 5cmm boards is closer to $60
[12:21:47] <_ami_> sabor: prototype service!
[12:21:59] <carabia> bss36504: you mean the 1117?
[12:22:41] <carabia> going small is the theme of the channel, we should extend it to vregs aswell
[12:22:48] <bss36504> carabia: yeah
[12:23:13] <carabia> so i was looking at some smaller and cookier alternatives for him, with say, 170+ tja
[12:23:51] <carabia> going small means good. mkay
[12:24:13] <bss36504> I used 90C/W
[12:25:27] <carabia> yes, in any case big packages and heatsinks are overrated
[12:25:50] <carabia> they uglify your slim and sleek design
[12:29:14] <bss36504> Gotta use one of those newfangled SMPS designs.
[12:29:39] <bss36504> I'm such an SMPS elitist that I only use SiC transistors /s
[12:32:06] <_ami_> bss36504: don't need more than 3 of them for now atleast! :)
[13:03:12] <uniqdom> Lockbits can be changed more than once, right?
[13:09:25] <uniqdom> I don't want that an user can read the application code. I'm planning to set LB to mode 3 (Further programming and verification of the Flash and EEPROM is disabled in Parallel and Serial Programming mode), BLB0 to mode 4 ((E)LPM executing from the Boot Loader section is not allowed to read from the Application section) and BLB1 to mode 4 ((E)LPM executing from the Boot Loader section is not allowed to read from the Application section)
[13:09:37] <uniqdom> is that OK?
[13:36:18] <twnqx> the chip can be fully wiped, which includes flash, eeprom and fuses, yes
[13:37:06] <uniqdom> but the user will be unable to read the code to a .hex file
[13:37:09] <uniqdom> right?
[13:37:10] <twnqx> does it allow the bootloader still to be updated in some way, potentially with user supplied binary?
[13:37:53] <twnqx> (e.g. through the bootloader itself)
[13:38:31] <twnqx> if yes, people can do pretty nasty things and beat your protection. if you only have the application and no bootloader, you should be pretty safe.
[13:38:34] <uniqdom> bootloader is supposed to use the SPM instruction to write to the Flash. with BLB in mode 4 the bootloader will not be able to use that instruction
[13:39:35] <uniqdom> my bad... is mode 3
[13:39:53] <uniqdom> to disable LPM (read from flash) and SPM (write to flash)
[13:40:05] <twnqx> in mode 3 it protects the application section only
[13:40:48] <twnqx> so you can spm/lpm to the bootloader section
[13:41:48] <twnqx> you can exploit that by guessing, or probing, an lpm instruction in the application session (there will be one), and calling it with a timer interrupt set to fire just after that one instruction
[13:41:58] <twnqx> section, not session
[13:43:03] <uniqdom> http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf
[13:43:07] <uniqdom> page 353 and 354
[13:43:23] <uniqdom> BLB0 and BLB1 fueses
[13:43:52] <uniqdom> BLB0 is for application section, and BLB1 is for bootloader section
[13:46:08] <twnqx> the answer is simple. if the user has no means to run their own code on the chip, which requires reprogramming at least parts of it, they won't be able to read it
[15:21:16] <rue_house> is this the serial programmer?
[15:26:34] <rue_house> k, have to go to work for a bit.
[18:13:00] <carabia> it's oh so quiet
[18:13:11] <carabia> not even rue is talking to himself, which i find odd