#avr | Logs for 2016-02-12

Back
[01:18:37] <WormFood> There has been a long standing, and rather obvious (to me) bug in my baud rate calculator, that just hit me today, as I was going over my code. It doesn't hurt anything, it just has to do with how the colors are displayed. Can anyone spot the bug?
[01:23:39] <Casper> the greens are reversed?
[01:23:46] <WormFood> nope
[01:23:52] <Casper> always felt like it..
[01:24:24] <WormFood> which greens? There are 3 different shades of green being used.
[01:24:32] <WormFood> But, don't worry, that is gonna change real soon.
[01:24:48] <Casper> yeah the 3 greens...
[01:25:09] <WormFood> Some of those in yellow, are perfectly fine, and within Atmel's recommended maximum allowable error rate.
[01:25:11] <Casper> I always felt like the darkest should have been the first..
[01:25:36] <WormFood> It's getting narrowed down to a single shade of green.
[01:26:10] <Casper> but bed time... 2am... getting late... and barelly starting to feel tired...
[01:27:08] <WormFood> I'll tell you the answer to the bug I was talking about later. I'll give someone else a shot at seeing if they can notice the bug.
[01:27:20] <WormFood> or, I can /msg it to you
[01:27:45] <Casper> you can msg
[01:28:04] <Casper> you got me curious, but can't figure out...
[01:29:58] <WormFood> It's obvious once you know, isn't it?
[01:33:07] <Casper> nite
[01:59:37] <WormFood> D'oh! I just noticed another bug with the colors.
[02:05:22] <Haohmaru> could have i f*cked up an adc input pin by trying to use it (from the code) while the actual pin is configured as digital output?
[02:11:49] <WormFood> Haohmaru, are you asking if you could have fucked it up, by software?
[02:13:58] <Haohmaru> yes
[02:15:10] <Haohmaru> i wrote some functions that should in theory set-up the adc and sample any of the 16 channels, and i tried them out on all pins, even tho i am using some of the pins on ports A and B as digital outputs
[02:23:59] <cehteh> Haohmaru: nope
[02:24:24] <cehteh> the only thing which can go wrong is too high voltage and too high current on a pin
[02:25:27] <Haohmaru> would high current flow into an actual adc input pin (assuming it's configured properly) if you directly slap it to ground or VCC?
[02:25:51] <cehteh> Haohmaru: did you follow my suggestion to make the 'most simple C Program' to test the adc before trying some C++ stuff and more bells and whistles?
[02:26:03] <cehteh> no
[02:26:14] <cehteh> or at least very little current
[02:26:19] <Haohmaru> not yet
[02:26:47] <cehteh> just put a 1k resistor on your pin, that should protect it against overcurrent
[02:27:11] <Haohmaru> yeah, i've put 10k in series..
[02:27:23] <cehteh> 10k may be too high
[02:27:39] <Haohmaru> it will be noisy?
[02:27:50] <cehteh> see datasheet, impedance on ADC (at least for the megas) must be below 15k iirc
[02:28:12] <cehteh> wont sample correctly at least not at full speed
[02:29:48] <cehteh> when your signal is noisy then a rc filter at the input will help too
[02:30:36] <Haohmaru> changed the resistor to 2.2k now
[02:30:58] <cehteh> http://tinyurl.com/onqagld
[02:31:01] <Haohmaru> i don't care if it's noisy right now, i wanna get it sampling at least
[02:31:11] <cehteh> yes
[02:31:18] <cehteh> i suspect you configured something wrong
[02:31:32] <cehteh> mux error or prescaler error or some other flags
[02:32:07] <cehteh> i dont know the xmegas .. maybe something more to configure (powersaving register by default turns adc off?)
[02:32:16] <Haohmaru> what does the prescaler do? isn't that only used if you want the ADC to be "freerunning" ?
[02:32:56] <cehteh> no
[02:33:22] <cehteh> its the frequency the ADC does the single sampling .. and see datasheet, there is an allowed range
[02:33:35] <cehteh> and when it is wrong the results will be wrong
[02:34:06] <cehteh> you have to calculate the prescaler based on your system clock
[02:34:37] <cehteh> that could be alerady the error .. told ya yesterday
[03:00:19] <Haohmaru> i tried prescalers from DIV16 to DIV512 .. nothing changes pretty much
[03:00:31] <Haohmaru> the pin i want to measure gives 2047
[03:03:07] <cehteh> do you have a schematic of your setup?
[03:03:29] <cehteh> did you verify that the voltage on the pin you want to measure really changes?
[03:03:51] <Haohmaru> yes.. i probe at the same point with the scope
[03:03:56] <cehteh> if so, then make the simple C program i suggested
[03:04:15] <cehteh> i am pretty sure you do something wrong
[03:04:33] <cehteh> or maybe you hosed the xmega, try with another one
[03:04:56] <Haohmaru> when i read channel 0 i'm getting varying values very close to zero
[03:04:56] <cehteh> but still my bets are 90% on some programming/configuration error
[03:05:08] <Haohmaru> like between -8 and +7
[03:05:17] <Haohmaru> with the same functions
[03:05:19] <cehteh> -8?
[03:05:34] <Haohmaru> yes, i'm measuring in signed mode
[03:05:40] <Haohmaru> single-ended
[03:06:19] <cehteh> mhm
[03:06:31] <cehteh> try unsigned default'ish setup
[03:07:17] <Haohmaru> and on pin 8 i also get a varying voltage around +800
[03:07:45] <cehteh> same setup?
[03:07:47] <Haohmaru> unsigned mode has an offset, so i don't want that
[03:08:13] <cehteh> doesnt matter what you want .. first try to confirm that you can read values reliably
[03:08:19] <Haohmaru> yes, with my function i can select any of the 16 ADC input pins and take a measurement with the same settings with ADCA or ADCB
[03:09:04] <Haohmaru> i tried everything, i always get +2047 on the pin i want to use (pin15) and i get varying voltages on pin0 and pin8 as i mentioned above
[03:09:10] <cehteh> debugging is about finding the error methodically ... eliminating all possible causes of the bug until you find the problem
[03:09:36] <Haohmaru> okay.. i'll try unsigned mode
[03:09:40] <cehteh> either that pin is hosed .. or you configure something wrong
[03:09:51] <cehteh> in the first case checking with another chip would help
[03:10:52] <Haohmaru> trying another chip won't be easy
[03:11:24] <Haohmaru> now, in signed mode i get... 4095
[03:12:10] <cehteh> and when you mux to another pin (that the only change) then it works?
[03:13:20] <Haohmaru> you mean if i try to sample one of the other pins?
[03:13:29] <cehteh> yes
[03:13:48] <cehteh> ADMUX or whatever its named on xmega
[03:14:15] <Haohmaru> yes, again, i get 4095 for pin15, i get varying voltage on pin8 around 1600, etc..
[03:14:39] <cehteh> ok .. what other functionality can pin 15 have?
[03:15:02] <cehteh> like uart or so .. something which may accidentally override your configuration
[03:15:02] <Haohmaru> it's ADCA.CHx.MUXCTRL
[03:15:20] <cehteh> i am still talking about a simple C program
[03:15:47] <Haohmaru> pin15 is PORTB pin7.. ports A and B are "analog" on the xmega, so there are no uarts or spis or such
[03:16:17] <Haohmaru> hm
[03:16:28] <cehteh> i dont know, on other chips you can assign a lot functions
[03:16:47] <Haohmaru> PB7 can be, apart from ADC15, AC0OUT (comparator maybe), and JTAG TDO
[03:16:53] <Haohmaru> feck.. jtag?
[03:17:00] <Haohmaru> lemme see my fuses
[03:17:03] <cehteh> on megas when you enable UART for example it overrides a lot other configurations for these pins
[03:18:05] <Haohmaru> yes, but the digital modules are on ports C, D, E, F, etc..
[03:18:12] <Haohmaru> on the xmegas
[03:19:30] <cehteh> hey i dont know .. i hint you only to debug that problem methodically, eleminating all possible causes
[03:19:40] <cehteh> you have to look and figure out by yourself
[03:20:09] <Haohmaru> my xmega's pins look pretty much like this one: http://obrazkiforum.atnel.pl/1066/4dbe4f5ed4dd243139948440af50ed5a.png
[03:20:58] <Haohmaru> PB7 can be "ADC7" or "ADC15" depending on the mode of operation of the ADC
[03:21:14] <cehteh> you saied pin15?
[03:21:19] <cehteh> pin 15 is VCC
[03:21:19] <Haohmaru> in single-ended mode it should be ADC15
[03:21:34] <cehteh> ah ADC15
[03:21:38] <Haohmaru> yes, i meant adc15, it's actually pin13 on the chip
[03:21:42] <cehteh> searching
[03:21:57] <cehteh> where is that?
[03:22:11] <Haohmaru> where is what?
[03:22:37] <cehteh> ADC15
[03:22:50] <Haohmaru> it's not on the picture
[03:22:59] <Haohmaru> it's in the datasheet tho
[03:23:15] <Haohmaru> PB7
[03:23:32] <cehteh> ok
[03:23:47] <cehteh> well dunno .. doublecheck
[03:29:43] <Haohmaru> i've disabled the jtag in the past, so it's not because of it..
[03:31:40] <Haohmaru> or is it
[03:31:43] <Haohmaru> >:/
[03:40:12] <Haohmaru> reading it with avrdude, fuse4 is 0xFE, lowest bit is the jtag.. crap
[03:40:55] <Haohmaru> i forgot that due to a silly reason i'm not using avrdude 6.x, so i'm not flashing the full .elf but the individual .hex files, thus i haven't actually flashed the fuses.hex x_x
[03:46:13] <cehteh> :D
[04:37:31] <Haohmaru> now i'm getting a varying voltage on pin15 similarly to pin0, about +800 in signed mode
[04:39:32] <cehteh> :P
[05:08:30] <Gerritjan> im trying to to learn not to write in arduino code and i did followed a tutorial but i cant see to get any out put of the uart --> http://pastebin.com/A8fdY26Y can sombody tell me why?
[05:13:58] <cehteh> why do people show up with some C++ libs here :D
[05:14:10] <cehteh> what chip is that, also xmega?
[05:14:30] <Gerritjan> Sam3x8e
[05:15:00] <cehteh> ah not avr then
[05:15:06] <Gerritjan> nope arm
[05:15:20] <Gerritjan> but there is no arm channel :S
[05:15:44] <cehteh> but i dont know the atmel arm's
[05:16:00] <cehteh> my avr serial stuff just works fine
[05:16:42] <Gerritjan> hahaha
[05:17:18] <Gerritjan> because the incomming is there i can see that the Rx led blinks but not the Tx to send back
[05:17:37] <lorenzo> SystemInit() is that avr?
[05:17:43] <lorenzo> ah arm
[05:17:47] <Gerritjan> hahaa
[05:18:05] <lorenzo> no cmsis for uart?
[05:18:27] <Gerritjan> lorenzo cmsis?
[05:18:50] <lorenzo> https://www.keil.com/pack/doc/CMSIS/Driver/html/group__usart__interface__gr.html
[05:19:24] <Gerritjan> i think its in the sam.h file
[05:19:41] <Gerritjan> this is the tut. http://codetron.net/uart-interface-sam3x8e-arduino-due/
[05:22:51] <Gerritjan> well im waiting on a order :D http://www.st.com/web/catalog/tools/FM116/CL1620/SC959/SS1532/LN1847/PF262631#
[05:23:23] <Gerritjan> so i think i need to wait with this tut because it will be a other type of writing i guess :D
[05:27:46] <lorenzo> damn, sprintf() is enough to fill this attiny4313
[05:30:15] <cehteh> heh
[05:32:01] <cehteh> printf things are somewhat bad when you want to conserve space, the formatstring needs some interpreter which adds a lot weight
[05:32:43] <cehteh> avrlibc has some options to trim it down but better avoid it and build a string with discrete function, appending whatever you need
[05:33:19] <cehteh> (or not build up big strings at all to conserve memory
[05:33:45] <Haohmaru> what's wrong with C++ ?
[05:34:22] <cehteh> sometimes bloat. and quite complex language
[05:59:34] <Drzacek> Hello. Anyone has experience with IR transmit diodes? I want to use one in my project (with attiny85), it says it has 100mA and 1.2-1.4V forward voltage. Can attiny even drive such LED? If I drive it at 50mA (or 20mA) will it work?
[06:01:53] <Lambda_Aurigae> I would drive it through a transistor to get the full output.
[06:02:17] <Lambda_Aurigae> you CAN drive it with lower current but you won't get the full output and full range you would expect at 100mA
[06:25:53] <WormFood> http://wormfood.net/avrbaudcalc-testing.php <-- I'm still working on it, but I have some cool changes done already. I'm seeking feedback and suggestions. Changes so far, is error rate is signed, and higher precision, and if you mouse over it, it will give you the actual bit rate.
[06:25:54] <Drzacek> Lambda_Aurigae, can you recommend a transistor? Or is there online calculator?
[06:26:15] <Lambda_Aurigae> 2n2222 or equivalent.
[06:26:45] <Lambda_Aurigae> grab something out of an old radio and experiment dude!
[06:27:24] <Lambda_Aurigae> without knowing more about your application, frequencies, and such, no way to be more specific.
[06:27:31] <Lambda_Aurigae> WormFood, kewl.
[06:27:54] <WormFood> I'm wondering if I should remove the mouse-over, and make that info another field.
[06:28:21] <WormFood> I've tried to keep a similar look and feel to what is in the Atmel datasheets
[06:33:47] <Drzacek> Lambda_Aurigae, I'm trying to build simple remote control for my TV, I assume it should work @38kHz
[06:34:08] <Lambda_Aurigae> look at the tv-b-gone
[06:34:14] <WormFood> why would you assume that?
[06:34:43] <Lambda_Aurigae> 38KHz is one of several frequencies that tv remotes use.
[06:34:51] <Lambda_Aurigae> most of them are within a few KHz of that but,,
[06:35:09] <WormFood> Also, they use different methods, such as uhf
[06:38:16] <Lambda_Aurigae> ladyada uses a 2n3904
[06:38:34] <Lambda_Aurigae> https://www.google.com/search?q=tv-b-gone+schematic&client=ubuntu&channel=fs&biw=1303&bih=926&tbm=isch&imgil=AFpCqtnnMECqVM%253A%253BqQwBU5HCi06z0M%253Bhttps%25253A%25252F%25252Flearn.adafruit.com%25252Ftv-b-gone-kit%25252Fdownload&source=iu&pf=m&fir=AFpCqtnnMECqVM%253A%252CqQwBU5HCi06z0M%252C_&usg=__N9eJUX4LUl4d4HFs1X6TERoTWfs%3D#imgrc=AFpCqtnnMECqVM%3A
[06:39:03] <Lambda_Aurigae> others use pn2222a
[06:39:23] <WormFood> would a 2sc1969 work?
[06:39:44] <WormFood> I have a few of those
[06:39:56] <Lambda_Aurigae> should.
[06:40:10] <Lambda_Aurigae> it should be high enough frequency capable easily.
[06:40:12] <WormFood> unlikely
[06:40:42] <WormFood> it can easily handle the frequency. I will work at 30 Mhz, without problems.
[06:41:07] <Lambda_Aurigae> datasheet I'm seeing says 27MHz...either way, should work.
[06:41:32] <WormFood> It needs a little higher than average drive.
[06:41:36] <Lambda_Aurigae> 16W is a bit of overkill.
[06:42:13] <Lambda_Aurigae> so use something like 100ohm resistor between the avr and the base of the transistor and it should be good...
[06:42:30] <WormFood> check out the MRF455 (I think that's the number. I'm just going by memory)
[06:43:26] <Lambda_Aurigae> yeah..nice toy that.
[06:43:45] <Lambda_Aurigae> shortwave radio power amp transistor.
[06:43:59] <WormFood> I've used them before.
[06:44:03] <WormFood> they're fun to replace
[06:44:12] <WormFood> I mean that sarcastically.
[06:44:19] <WormFood> I HATE working on RF amplifiers.
[06:44:28] <Lambda_Aurigae> yeah...can imagine the 150 watt soldering gun to dismount that sucker.
[06:44:42] <Lambda_Aurigae> that is, if it isn't spot welded down.
[06:44:51] <WormFood> You're absolutely right, and if you can get a 200 or 250 watt gun, it's even easier
[06:44:59] <WormFood> They're not welded
[06:45:07] <WormFood> That'd make 'em really tough to replace.
[06:45:13] <Drzacek> I have BF459 laying around
[06:45:40] <WormFood> Anyways, if you, or someone else doesn't have any comments or suggestions on my changes to my calculator, then I'm gonna go back to work.
[06:46:11] <Lambda_Aurigae> WormFood, not really...it looks ok to me...but,,the old one looked ok to me too.
[06:46:18] <Lambda_Aurigae> I'm all for simplicity and text.
[06:46:53] <Lambda_Aurigae> Drzacek, should work fine.
[06:47:50] <WormFood> oh yeah, I forgot that I added the data bit size, so that the maximum recommended error rate can be displayed
[06:48:19] <Drzacek> and I found few C547C
[06:56:35] <Lambda_Aurigae> Drzacek, lookup the datasheet and make sure the frequency is at least double what you are going to be pushing through it and you are golden.
[11:09:23] <Deskwizard> Caesium: LOL glab you found it !
[11:12:07] <Shavik> So I've been using ATMega AVR's for a few years now, mainly the 328 and 324 (more uarts). I know I've ready plenty of negative things about no one using the xMega series but looking at the datasheets, they are far superior. What am I missing on why no one seems to use these?
[11:12:24] <Shavik> Feels like I'm missing a big piece of the puzzle
[11:13:03] <Deskwizard> Shavik: I think its mostly a use case thing... basic things they overkill, more involving, you could get "better" ones for cheaper
[11:13:19] <Shavik> For example, the ATxMega64A4U, has USB, 5 UARTs, 2 SPI/I2C
[11:13:21] <Deskwizard> Shavik: at least thats what I gathered from my readigns when I wondered the same thing you did hehehe
[11:13:26] <Shavik> Yea, I hadn't looked at price yet
[11:13:30] <Shavik> That could be a big factor
[11:13:46] <Deskwizard> Shavik: but yeah, I dont think its an issue with the XMega itself, if you see what I mean
[11:13:47] <Shavik> I'm basically looking to make be a nice in house "arduino" that is a bit more custom fit for all my various projects
[11:14:23] <Shavik> Only said "arduino" because it'd be a general purpose prototype board, but thats about where the similarities would stop
[11:14:41] <cehteh> arent xmegas relative expensive?
[11:15:13] <Shavik> $4.84 for one ATxMega64A4U
[11:15:17] <cehteh> ah ok
[11:15:18] <Shavik> a small 44 pin version
[11:15:26] <Shavik> $3.54 at 100 qty
[11:15:30] <Shavik> digikey prices
[11:15:35] <cehteh> i wont mind using one if i need so, never felt that urge
[11:15:45] <Deskwizard> same here
[11:15:58] <Shavik> yea. I was just looking at this new project I'm about to work on. Was wanting HW usb support but 2 UARTS
[11:16:15] <cehteh> or rather when i need anytihng bigger than 328p .. i'd consider stm32
[11:16:19] <Shavik> my options are pretty limited if not non existent on the mega line
[11:16:23] <cehteh> but thats a completely different beast
[11:16:29] <Shavik> I use athe 324PA at lot at work since it has 2 UARTS
[11:16:37] <Deskwizard> Shavik: do you need two HARDWARE uart
[11:16:40] <Deskwizard> so does 328PB iirc
[11:16:41] <LeoNerd> 328PB has two UARTs
[11:16:43] <Shavik> wut
[11:16:47] <Deskwizard> YES!
[11:16:48] <LeoNerd> 32U4 has 1 UART and hardware USB
[11:16:56] <Deskwizard> I was lke! whao nice! as well re: 328PB
[11:17:01] <Shavik> yea LeoNerd It has the usb and 1 UART
[11:17:04] <Shavik> I needed 2 UARTS
[11:17:22] <Shavik> USB is a "nice" thing I'm wanting to experiment with
[11:17:23] <Deskwizard> Shavik: I'd look at the 329pb if I were, you, you already know the chip, just add cap sense and 2dn uart ;)
[11:17:27] <cehteh> nothing really stops you using xmegas when you really need them
[11:17:29] <Deskwizard> im getting some in my next order ;)
[11:17:35] <Deskwizard> 238pb*
[11:17:40] <Shavik> I hadn't heard about the 329
[11:17:41] <Shavik> Wait
[11:17:45] <Deskwizard> FAWK
[11:17:45] <LeoNerd> Some of the ATtiny chips have two UARTs... e.g. the tiny841
[11:17:49] <Deskwizard> 3 2 8 P B
[11:17:51] <Shavik> But no U SB right?
[11:17:53] <Deskwizard> gawd.
[11:18:05] <Deskwizard> Shavik: vusb if you're so inclined :P
[11:18:12] <cehteh> well past days i remember some people nag here with problems related to xmega's .. of course programmers errors, but they are a little different than the known mega
[11:18:17] <Shavik> I have already transistioned most of our 10 pcb's to the 324
[11:18:20] <Shavik> Bit late for that :P
[11:18:21] <cehteh> setting clock speed at runtime etc
[11:18:22] <Deskwizard> you want 2 hardware uart and hardware usb, get a pic.
[11:18:23] <Deskwizard> lol jk
[11:18:42] <Shavik> Our old HW engineer that I'm kinda slowly replacing
[11:18:43] <cehteh> stm32f3 ....
[11:18:46] <Shavik> Did our last generation stuff in PIC
[11:18:53] <Shavik> I converted all our product and him to AVR
[11:18:55] <Shavik> He loves it now
[11:18:59] <Deskwizard> cehteh: ty, i'll look into that
[11:19:00] <Shavik> Had been doing PIC for like 15-20 years or something
[11:19:01] <Deskwizard> :)
[11:19:10] <cehteh> i thing there are some where you get 5 UART, USB and shitloads of features
[11:19:14] <Deskwizard> I'm sorry, I didnt mean to start a war... lol
[11:19:31] <cehteh> haha
[11:19:50] <^Richard> we've done similar tbh
[11:20:07] <Shavik> so I guess if the 328PB has 2 uarts, then the only thing the 324PA has is an extra port?
[11:20:11] <Shavik> and maybe jtag?
[11:20:46] <cehteh> canbus?
[11:20:59] <Shavik> No canbus on 324
[11:21:00] <Shavik> I wish
[11:21:10] <Shavik> Thats something else I wanna play with now that I got my new scope with can bus decoding in it :D
[11:21:25] <LeoNerd> Eh.. I do bus decoding with sigrok
[11:21:30] <LeoNerd> Muuuuuch more powerful than things on scopes
[11:21:40] <Shavik> I like my keysight protocol decoding
[11:21:51] <Shavik> imo better than my salae
[11:22:06] <LeoNerd> Generally, scopes go as far as printing tables of numbers for thnigs like I2C or SPI buses, yes?
[11:22:26] <LeoNerd> sigrok can be told what kind of chip is attached, so give you names of registers you're reading/writing to, decodes the meanings of the bitfields inside those
[11:22:34] <LeoNerd> warn of invalid bit flag combinations in those registers, ...
[11:23:06] <Shavik> Thats handy
[11:23:32] <Shavik> My scope can do I2C, SPI, RS232/UART, CAN/LIN, FlexRay, I2S, and MIL-STD 1553 / ARIN 429
[11:24:08] <Shavik> I'm sure there are better analyzers but it works great for me and fulfils all my needs to this point. much better than what I was using before at least. The 4 channels helps as well. My last scope was a run of the mill Last gen Rigol
[11:24:23] <LeoNerd> You can probably point sigrok at your scope, though
[11:24:35] <LeoNerd> It talks to justabout anything that can do USB-based SCPI, or other things
[11:24:45] <LeoNerd> E.g. I use it with my saleae probe and my rigol scope. works lovely
[11:24:56] <Shavik> Yea there is a usb interface. I haven't messed with it yet. I didn't spring for the VGA/Ethernet module
[11:24:59] <Shavik> Was another $400 ish dollars :P
[11:26:19] <Shavik> Thanks for the tip about the 329PA. Will have to look into it more. Not sure if it's worth switching to considering we just switched everything to the 324PA. Which is more expensive it seems :/
[11:26:32] <Shavik> Damn it
[11:26:34] <Shavik> You got my saying 329
[11:26:41] <Shavik> me* 328PB
[11:27:08] <Shavik> Wow
[11:27:09] <Evidlo> Do the various Timer Control registers get reset to the default value before a flash?
[11:27:09] <Shavik> It's cheap
[11:27:46] <LeoNerd> Evidlo: "before a flash" ?
[11:27:55] <Evidlo> at the beginning of a flash
[11:28:07] <LeoNerd> Youmean: on reboot?
[11:28:35] <Evidlo> yes
[11:28:47] <Evidlo> I guess that's why they get set at runtime
[11:29:03] <LeoNerd> You'll have to check the datasheet.. certain fields of certain registers have power-on defaults, but Idon't think that applies universally.. i.e. there might be some bits that don't get reset
[11:29:18] <LeoNerd> Best not to rely on anything, and always actually -set- the bits you want
[11:29:51] <Evidlo> Well the tiny85 datasheet gives "initial value" for each bit in the register
[11:30:08] <LeoNerd> Ah, then that likely sounds liek it's reliable
[11:30:36] <Deskwizard> I agree with LeoNerd, dont count on the PWON value
[11:30:41] <Deskwizard> especially if you use a bootloader
[11:31:00] <Deskwizard> (unlikely on attiny45 but still thought id mention)
[11:31:34] <Shavik> Jesus... The 328PB is so much cheaper :(
[11:31:44] <Evidlo> My blink code still isn't working. The led is always on :(
[11:31:48] <Shavik> Well I guess I will spin this as a "cost-cutting" "feature"
[11:31:50] <Caesium> is this the newly launched one, the 328PB?
[11:31:57] <Shavik> I'm not sure. I've never heard of it
[11:32:07] <Deskwizard> Caesium: yes
[11:32:20] <Shavik> To be honest, any of the "PB" devices, I haven't really heard of
[11:32:30] <Shavik> http://www.digikey.com/en/product-highlight/a/atmel/megaavr-pb-devices
[11:32:35] <Shavik> :O
[11:32:37] <Shavik> unique serial number
[11:32:39] <Deskwizard> Shavik: the 328PB is quite a recent device, the whole line aint that old
[11:32:42] <Shavik> omg that would solve so many of my problems
[11:32:51] <Deskwizard> :| I missed that part as well
[11:32:59] * Deskwizard needs reading classes lol
[11:33:09] <Deskwizard> or glasses, take your pick :P
[11:33:11] <Evidlo> Does this seem sane? https://dpaste.de/kBWF
[11:33:37] <Deskwizard> Evidlo: does to me... but I tend to edge on the insane border :P
[11:34:30] <Deskwizard> Evidlo: for the record, to test something like that, I'd enable either overflow or compare interrupt and toggle the led there
[11:34:40] <Deskwizard> easy way to use an LA to make sure your timing is correct
[11:35:20] <Deskwizard> like, nothing in for(;;) toggle and counter reset in interrupt
[11:35:34] <Deskwizard> but again, nothing wrong in the way you're doing it now :)
[11:37:41] <Evidlo> I'm going through a timer tutorial
[11:43:40] <Deskwizard> Evidlo: http://fourwalledcubicle.com/AVRArticles.php
[11:43:45] <Deskwizard> highly suggested.
[11:44:10] <Deskwizard> or should I say, that one managed to get through my thick brain :P
[11:44:46] <Deskwizard> timers is like riding a bycicle... pain in the ass at first but at some point you get it and it gets easy hehehe
[11:45:31] <Deskwizard> s/.../bicycle
[11:45:44] <Evidlo> My end goal is that I want to turn an 85 into a modem, but I'm not sure if I should write it myself or fix this other guy's code
[11:45:55] <Deskwizard> Evidlo: I'd say do your own
[11:45:57] <Deskwizard> trust me
[11:46:05] <Deskwizard> fixing other people's code just gonna piss you off
[11:46:11] <LeoNerd> Hah
[11:46:12] <Evidlo> How hard are digital filters?
[11:46:31] <cehteh> on tiny?
[11:46:32] <Deskwizard> at least if you make it yourself and it has bugs, you know its your fault, not wonder if its yours or the other guys :P
[11:46:51] <cehteh> filters need ram and fast multiplyadd operations
[11:46:55] <Evidlo> I just need to demodulate bell202
[11:47:09] <Deskwizard> Evidlo: bell202... DTMF?
[11:47:13] <Evidlo> So differentiating between two tones
[11:47:17] <Deskwizard> Ah
[11:47:21] <Evidlo> Not DTMF, Bell202 is AFSK
[11:47:25] <Deskwizard> oh okay
[11:47:35] <Deskwizard> but basically, you want to detect the frequency, correct
[11:47:41] <Evidlo> so only one tone at a time
[11:47:43] <Evidlo> yea
[11:47:46] <Deskwizard> :D
[11:47:56] <cehteh> can you do that analog? opamp, active filter?
[11:48:12] <Deskwizard> Evidlo: cheating: msgeq7 if the freq match :P but not cheating aint that hard
[11:48:19] <Evidlo> I've done that before, but I'm not keen on doing it again
[11:48:29] <Deskwizard> take the comparator, get lenght, convert
[11:48:32] <Evidlo> hardware filters I mean
[11:48:47] <Deskwizard> (im probably missing something here tbh :P)
[11:49:32] <cehteh> Evidlo: on avr i think its a nogo (digital filters in software) ..
[11:50:05] <Evidlo> Well this guy did it on less https://sites.google.com/site/wayneholder/attiny-4-5-9-10-assembly-ide-and-programmer/bell-202-1200-baud-demodulator-in-an-attiny10
[11:50:31] <cehteh> not bad
[11:50:33] <Evidlo> How difficult might it be to mod that to work on an 85?
[11:50:53] <Evidlo> Just changing some registers?
[11:51:09] <cehteh> you mean tiny85?
[11:51:15] <cehteh> should just work ...
[11:51:21] <Deskwizard> yeah
[11:51:39] <Evidlo> hmm
[11:51:44] <cehteh> i didnt expect the fitler to be so simple, what frequencies are to handle there?
[11:51:46] <Deskwizard> never used the tiny10 but register map is probably quite close
[11:51:53] <Evidlo> 1K and 1.2K
[11:52:10] <cehteh> doesnt use any registers there
[11:52:39] <Deskwizard> Evidlo: why dont you just get a tiny10 ? :P~
[11:53:18] <Evidlo> Don't have any right now
[11:54:04] <cehteh> how much ram has the tiny10?
[11:54:07] <cehteh> 32 byte?
[11:54:09] <Deskwizard> Evidlo: good reason ;)
[11:54:24] <LeoNerd> That's one of the SOT-23-6 chips?
[11:54:26] <cehteh> using 24 byte for the filter matrix
[11:55:04] <Deskwizard> LeoNerd: iirc yes
[11:55:09] <LeoNerd> Crazy things
[11:55:17] <Evidlo> The registers are at least a little different
[11:55:18] <Jartza> dom dom
[11:55:33] <Deskwizard> LeoNerd: nah, nice thing... crazy is 8 pin cortex-M0+ or Kinetix KL03 :P
[11:55:57] <Deskwizard> Evidlo: usually easy to fix, add or remove a 0, change G for E ... :P
[11:56:52] <Evidlo> I can do that, but when I mess up one little thing and the whole thing breaks...
[11:57:02] <Evidlo> How do you even debug that?
[11:57:05] <LeoNerd> I just mean crazy-small
[11:57:22] <Jartza> cehteh: also attiny10 has half of the registers of normal avr core
[11:57:24] <LeoNerd> I've started using some crazy-small chips myself; e.g .the SOT-23-5 single-gate 74'125 variant
[11:57:27] <Jartza> only r16-r31
[11:57:38] <LeoNerd> Really useful for gating the "serial output" line of a not-quite-SPI chip, onto an SPI bus
[11:57:48] <LeoNerd> Because nobody does hi-Z properly
[11:57:49] <Jartza> just like tiny5
[11:58:03] <Jartza> the difference between tiny5 and tiny10 is flash
[11:58:11] <Jartza> first has 512 bytes, latter 1024 bytes
[11:58:22] <Deskwizard> LeoNerd: Nice! I go could with that
[11:58:54] <LeoNerd> For another crazy idea of mine, I really want a single-gate shift-register chip, but the operation I want would need 7 pins, which is a little too much for a SOT-23 size
[11:59:08] <LeoNerd> Vcc Gnd DI DO SCK Latch OE
[11:59:14] <LeoNerd> .. oh, and the actual Q output. 8 pins
[11:59:46] <LeoNerd> I don't know if someone might do a TSSOP-8 sized 74AHC1G595
[12:00:07] <Evidlo> Also the attiny10 has a thing called input capture, but I don't see that anywhere for the 85
[12:01:35] <cehteh> yes 85 dont have it
[12:01:48] <cehteh> ugly workaround would be pinchange interrupt
[12:02:22] <Evidlo> So just save the value of TCNT1 somewhere during interrupt
[12:03:03] <Deskwizard> or maybe analog comparator with GND or VCC ref or half of it or something
[12:03:14] <Deskwizard> I havent looked into it yet, its my next project hehe
[12:08:03] <Jartza> Evidlo: oh, why you need Bell 202?
[12:09:42] <Evidlo> I don't. I just need to modulate data
[12:10:25] <Evidlo> Basically I have a bunch of micros that I need to communicate via radio
[12:10:54] <LeoNerd> nRF24L01 :)
[12:11:01] <LeoNerd> (those things are lovely)
[12:11:08] <Evidlo> No, more like several miles
[12:11:12] <Evidlo> its a balloon
[12:11:16] <Jartza> what kind of radio
[12:11:18] <Jartza> ahh
[12:11:24] <LeoNerd> Ahh... Yeahhh.. you won't get a mile out of those ;)
[12:11:25] <Evidlo> DRA818V, FM 433MHz
[12:11:33] <Evidlo> I've already picked a radio
[12:11:36] <Jartza> just thought of my audio modulation :)
[12:11:56] <Jartza> I don't know about 433Mhz, but it DOES work pretty nicely over "normal FM" radio
[12:12:01] <Jartza> 12kbps
[12:12:09] <Jartza> and there's code already for attiny85
[12:12:16] <Evidlo> What's the project called?
[12:12:18] <Jartza> http://labs.rakettitiede.com/12kbps-simple-audio-data-transfer-for-avr/
[12:12:28] <Evidlo> Oh, heh I saw that already
[12:13:43] <Evidlo> yeah I'll try this
[12:15:06] <Evidlo> Also I've got 25KHz of bandwidth
[12:18:38] <Jartza> Evidlo: it would be VERY nice to know if it works over that radio :)
[12:19:15] <Jartza> Evidlo: https://drive.google.com/file/d/0B2dTzW9TMeBxMnVMNURtenZYSFU/view
[12:19:26] <Jartza> at least it works over that tiny FM transmitter
[12:20:08] <Jartza> 87.5MHz :)
[12:20:51] <Jartza> it works even with quite a lot of noise
[12:29:54] <Jartza> you could of course always try slower speeds if it doesn't work
[12:34:10] <Shavik> LeoNerd, DeskWizard. Just hypothetically speaking, If I were to really like the 328PB but wanted a bit more flash space... Suggestions?
[12:34:32] <Shavik> I'm looking at the selector but I'm struggling lol
[12:34:37] <LeoNerd> You'd be prettymuch at the top end of what AVR(8) offers, then
[12:34:55] <LeoNerd> Things like the 644 have more flash space, but I think fewer peripherals than the 328PB
[12:35:10] <Shavik> I had looked at the ATmega1284P
[12:35:13] <Deskwizard> Shavik: external flash?
[12:35:13] <Deskwizard> :P
[12:35:15] <LeoNerd> You -might- find something up in Xmega, but you'd be more likely to want to look over at the ARM Cortex shaped things
[12:35:21] <Deskwizard> as big as you want :P
[12:35:22] <LeoNerd> STM32 or SAMD or such
[12:35:34] <Deskwizard> SAMD11 has USB iirc
[12:36:05] <Shavik> I'm working on a SAMA5D44 based linux single board computer. but it's months away. Wanting to make this smaller board first
[12:36:05] <Deskwizard> the one I want to try next is the Kinetix KL03
[12:36:41] <Shavik> Lots of DDR signaling and such there
[12:36:43] <Deskwizard> Shavik: since you mentionned USB earlier, SAMD11 might be interesting for you, I sure had a "oh, i could use that somewhere" moment when I gnalced over yesterday
[12:37:08] <Shavik> I'm also having these boards fab'd but I'm doing assembly myself so pin count / package is a concern
[12:37:17] <Shavik> as long as the pins are exposed, I "should" be ok
[12:38:05] <avr_drone_noob> Hi there, i want to give it one more shot.. i would like to fly my drone in this weekend, but unfortunately i can't flash my kk2 flight controller with Atmel 644PA chip... it gives me the following error: verification error, first mismatch at byte 0x0000 0xff != 0x0c
[12:38:10] <Shavik> Deskwizard: Seems that is 16kb Flash?
[12:38:32] <Shavik> Yea, I'm making a custom drone with mine too
[12:38:41] <Deskwizard> Shavik: perhaps, honestly I havent looked that much into it, I just noticed glancing over general uC page
[12:38:45] <Shavik> Ah
[12:38:58] <Shavik> I'm wondering the learning curve transitioning from the 8bit avr world to the SAM
[12:39:01] <Deskwizard> maybe theres a SAMD21 or something with double the flash lol
[12:39:14] <Deskwizard> Shavik: same here, depends on the tools and what you're used to I guess
[12:39:35] <Shavik> With my SBC SAM linux board im making, I was just gonna use the uc bootloader and get a linux image to flash it
[12:39:57] <Shavik> I have tons of linux experience and a moderate amount of 8bit avr experience
[12:40:00] <Deskwizard> yeah my ARM experience have been with linux SBCs as well
[12:40:05] <Shavik> So It feels like this scary gray area lol
[12:40:13] <avr_drone_noob> Shavik: you ever flashed kk2 before?
[12:40:16] <Deskwizard> Shavik: then you clearly know more than I do, I'll shut up now :P
[12:40:20] <Shavik> I use Embedded Arm Products in a medical environment
[12:40:22] <Shavik> with good results
[12:40:33] <Deskwizard> Shavik: Oh, interesting !
[12:40:36] <Shavik> SBC linux machines
[12:40:45] <Shavik> Passed through the UL1069 tests and everything
[12:40:49] <Shavik> 100,000 input/ouput cycles
[12:40:54] <Shavik> took around 12 weeks
[12:41:14] <Shavik> But all is for work so I'm trying to expand my personal portfolio
[12:41:18] <Shavik> Stuff I can talk about how it works :D
[12:41:35] <Deskwizard> Shavik: careful, I'll remember that :P~
[12:41:47] <Shavik> Which part? ;)
[12:41:54] <Deskwizard> all your experience heheheh
[12:42:13] <Shavik> Oh It's pretty specialized. I'm far from "smart"
[12:42:23] <Shavik> I occupy a wierd niche
[12:42:31] <Deskwizard> Shavik: makes both of us :P we just seem to be going in the same direction
[12:42:41] <Shavik> Well I'm open to collabing on anything you want to
[12:42:42] <Deskwizard> yeah, I did as well, emergenry vehicule electronics.
[12:42:49] <Deskwizard> emergency
[12:43:02] <Shavik> Ah, I have seen a few companies in my local area offering camera solutions for police forces
[12:43:04] <Deskwizard> basically, make light and noise :P~
[12:43:14] <Shavik> but I always think I could do such much better but I am too busy lol
[12:43:16] <Deskwizard> Shavik: let me guess, St-Louis ? :P
[12:43:19] <Shavik> Nashville
[12:43:28] <Shavik> "close-ish"
[12:43:54] <Deskwizard> Shavik: Oh okay hehehe 'cause there's like... 4-5 majour manufacturers in that field lol
[12:43:58] <Deskwizard> major*
[12:43:58] <Shavik> avr_done_noob: I have not. I have never used a pre-built quadcopter controller
[12:44:09] <Shavik> Yea I'm mainly referring to "local" gigs
[12:44:20] <Shavik> They basically piece together COTS parts
[12:44:34] <Shavik> I'm like with a decent linux server backend and some simple custom hardware in the car
[12:44:36] <Shavik> it'd be "easy"
[12:44:57] <Shavik> store it locally until they get back to the station then they could just offload their locally "saved" video to the main stores via wifi
[12:44:59] <Deskwizard> Shavik: yeah, it is... theres nothing complicated in their stuff, honestly.
[12:45:06] <Deskwizard> Shavik: It's dumber than that...
[12:45:14] <Shavik> But then again, I haven't actually tried so I'm woefully uninformed
[12:45:37] <Deskwizard> Shavik: no, actually, your thinking of doing it in a better way than its mostly done in the industry :P
[12:45:44] <Shavik> I usually try to over engineer a solution then boil that down to it's simplest form.
[12:45:49] <Deskwizard> LOL
[12:45:50] <Deskwizard> yeah, same here
[12:46:20] <Shavik> In the medical field (probably all others too), it's pretty much accepted everything will fail. but you have to have systems monitoring those systems that monitor those systems
[12:46:25] <Shavik> so nothing can fail, without someone knowing
[12:46:28] <Deskwizard> Shavik: for the kicks of it, look at the Kinetix KL03, might not be useful for your current project, but if you're anything like me, you'll have ideas on what to do with it :P
[12:46:35] <Shavik> standard says 90 seconds of notification. I give 5 seconds
[12:46:36] <Shavik> :D
[12:46:44] <Deskwizard> Shavik: Yes, but you have to worry about intrinsic safety dont you ?
[12:46:54] <Shavik> elaborate?
[12:47:10] <Deskwizard> My father used to be IT admin at hospital (just a random fact)
[12:47:17] <Deskwizard> Shavik: 1 sec, im bad at explaining :P
[12:47:28] <Shavik> We limit voltage to the room to 48V, then 24V within 6ft of the patient area
[12:47:32] <Shavik> Bout all I can say
[12:47:35] <Deskwizard> https://en.wikipedia.org/wiki/Intrinsic_safety
[12:47:48] <Shavik> We do not have to be safe to ignition
[12:47:49] <Shavik> But
[12:47:53] <Shavik> There are oxygen rich rooms
[12:48:01] <Shavik> They test our devices for ignition I guess
[12:48:04] <Deskwizard> yeah, I would have thought you would because of them
[12:48:05] <Shavik> So maybe I was wrong in my first statement
[12:48:14] <Shavik> Basically they have cotton below our device
[12:48:16] <Shavik> and try to melt it
[12:48:20] <Deskwizard> yeah, you porobably did, just didnt know you were heheeh
[12:48:24] <Deskwizard> you're THAT good ;)
[12:48:25] <Deskwizard> lol
[12:48:27] <Shavik> if it catches the cotton on fire in an oxy rich environment we fail
[12:48:37] <Shavik> So yea, Sorry. I was thinking like the gel packed radios
[12:48:39] <Shavik> for use in mines
[12:48:43] <Shavik> We aren't THAT safe
[12:48:52] <Shavik> but safe enough for medical positive pressure oxy rich rooms
[12:48:58] <Shavik> UV94 plastics, etc
[12:49:10] <Shavik> certain plastics, etc
[12:49:16] <Shavik> everything is planned for
[12:49:23] <Shavik> UL inspects our factory in China as well
[12:49:30] <Shavik> For PCB's, injection molding, you name it
[12:49:52] <Deskwizard> Nice, I LOVE proper design.
[12:50:01] <Deskwizard> "meh, it works..." not good enough for me
[12:50:03] <Shavik> btw. the UL1069 is "secret" but you can find it with a quick google
[12:50:06] <Deskwizard> hence why I never get shit done lol
[12:50:13] <Shavik> It covers all the requirements
[12:50:21] <Deskwizard> Shavik: yeah, you have to pay for those documents "in theory"
[12:50:31] <Shavik> It's 99% an electrical test. They blast shower stations with 3 industrial sprayers for 3 hours
[12:50:35] <Shavik> then test leakage current
[12:50:41] <Shavik> gogo gaskets
[12:50:42] <Deskwizard> TBH the ones im interested in are more the ones related to main connected products certification
[12:50:48] <Deskwizard> LMAO
[12:50:49] <Shavik> Well that is where we luck out
[12:51:06] <Shavik> I'd say it's beneficial to use COTS if possible for your mains connected equipment
[12:51:07] <Shavik> Also
[12:51:26] <Shavik> These guys have AMAZING servers
[12:51:27] <Shavik> http://www.comarkcorp.com/enews/build_auto/ba_0609_nfpa.html
[12:51:44] <Shavik> expensive. but insanely durable
[12:52:12] <Shavik> These http://www.comarkcorp.com/products/desktop_processing.shtml
[12:52:17] <avr_drone_noob> i think no one likes to help me lol.. =), then i will leave you guys alone
[12:52:27] <Shavik> Sorry, avr_drone_noob. I just don't know :(
[12:52:37] <Shavik> programmer not on backwards?
[12:53:03] <Shavik> Also Deskwizard, Solid State everything
[12:53:27] <avr_drone_noob> okay :), no.. i did not but: http://www.banggood.com/5V-USBASP-USBISP-AVR-Programmer-Download-Cable-With-10-Pin-Cable-Case-p-931222.html > can this program the Atmel 644PA? im not sure about that
[12:53:43] <Shavik> oh I'd have no idea
[12:53:47] <Shavik> I only have official programmers :/
[12:53:52] <Shavik> I have the AVR ISP Mk2 and ICE
[12:54:00] <Shavik> I dislike the ICE, it always disconnects or something
[12:54:04] <Shavik> I might have a defective unit
[12:54:19] <Shavik> I also have never used the 10pin avr programming port. only the 6
[12:54:25] <Shavik> Not much difference but for what its worth
[12:55:05] <avr_drone_noob> ah i see, okay.. yh i have a 10 to 6 pin converter on it now..
[12:55:20] <avr_drone_noob> but i will figure it out somehow! anyway thanks =)
[12:59:25] <Deskwizard> Shavik: obviously SS everywhere ;)
[13:09:19] <Shavik> Deskwizard... http://www.digikey.com/product-detail/en/ATSAMD11D14A-MUT/ATSAMD11D14A-MUTCT-ND/5226480
[13:09:24] <Shavik> That is insanely cheap
[13:09:37] <Shavik> Cheaper than my 8 bit avr
[13:09:39] <Deskwizard> Shavik: Yes
[13:09:43] <Deskwizard> insane isnt it
[13:10:16] <Deskwizard> I'm starting to realize sticking to 8-bit AVR is more nostalgia then logical.
[13:10:20] <Shavik> Yea
[13:10:25] <Shavik> I just need to make that leap
[13:10:26] <Deskwizard> or any 8bit for that matter
[13:10:32] <Shavik> 48Mhz too
[13:10:33] <Deskwizard> Unless in specific cases
[13:10:33] <Shavik> :P
[13:10:44] <Deskwizard> but for "general effin around" yeah...
[13:12:46] <Shavik> I guess my new ICE programmer can program these
[13:12:48] <Shavik> so thats a plus
[13:13:46] <Deskwizard> ftw :)
[13:19:54] <Jartza> Deskwizard: 8-bit avr still has it's place, but mostly attiny
[13:19:58] <Jartza> or xmega
[13:20:06] <Jartza> xmega fits nicely in between tiny and ARM :)
[13:20:14] <Jartza> atmega is obsolete
[13:20:18] <Jartza> avr32 was born dead
[13:21:21] <Jartza> xmega has best peripheral for buck -ratio
[13:21:35] <Deskwizard> Jartza: Yeah, I agree, thats what I meant by "in some cases" like my Fan controller... no need for an ARM or 32 bits to read a pulse
[13:21:41] <Deskwizard> as an example
[13:22:12] <Jartza> http://www.digikey.com/product-detail/en/ATXMEGA32A4U-AU/ATXMEGA32A4U-AU-ND/3046479
[13:22:14] <Deskwizard> Jartza: I totally agree with all you said, to be clear
[13:22:15] <Jartza> like that one
[13:22:42] <Jartza> http://www.atmel.com/devices/ATXMEGA32A4U.aspx?tab=parameters
[13:23:19] <Jartza> for that price, I wonder whoever buys those >$10 atmegas?
[13:24:45] <Shavik> Jartza I was looking at xmega earlier but everyone was hating on it still lol
[13:25:26] <Jartza> I don't know why
[13:25:27] <Shavik> I was considering to move everything to these cortex m0+'s now
[13:25:27] <Jartza> I like it
[13:25:44] <Shavik> super small and great performance. Whats not to like other than I've never programmed ARM bare metal before? lol
[13:25:49] <Jartza> for small things, attiny is nice, there are lot of nice options for it and very quick to get going
[13:26:06] <Jartza> xmega is bit more tedious to start and configure, but still quite ok (comparable to atmega IMO)
[13:26:15] <Jartza> cortex m is very nice, but already the setup is much harder
[13:28:29] <Shavik> I'm torn on making my own little M0 breakout or ordering a dev board
[13:32:15] <Shavik> Wow there is a M0+ cpu with 14 pins
[13:33:48] <Xark> There is one with 8 pins...
[13:34:13] <Jartza> yep
[13:34:27] <Jartza> 8-pin dip and soic :)
[13:34:38] <Xark> https://www.adafruit.com/products/1336
[13:34:44] <Jartza> Shavik: I suggest nucleo boards
[13:34:53] <Jartza> I have 3 of those, cortex m0+, m3 and m4
[13:35:14] <Jartza> ~10-15 bucks and you get st-link v2 programmer with it, so you don't need anything else
[13:35:52] <Jartza> and they have arduino compatible pins if you need shields :)
[13:36:02] <Jartza> http://grobotronics.com/images/detailed/12/M-07723.jpg
[13:36:26] <Shavik> I'm looking to get into making my own pcbs with these
[13:36:30] <Shavik> so shields aren't a concern
[13:36:36] <Shavik> :) But thanks though
[13:37:08] <Shavik> Isn't suggesting ST chips in here like blasphemy ? lol
[13:37:39] <Jartza> nah
[13:37:54] <Jartza> we've been also discussing PIC chips here :)
[13:37:54] <Shavik> Interesting starter kit Xark
[13:38:22] <Shavik> Yea I was showing our HW engineer in Chile the Cortex M4 with DSP functionality. Hes historically been a big fan of the DsPic series
[13:38:36] <Jartza> interesting kit, but more expensive than nucleo :D
[13:38:37] <Shavik> But I know nothing about ARM so I probably shouldn't speak
[13:39:04] <Jartza> my work-stuff is 90% arm, 10% other chips
[13:39:23] <Jartza> but my hobby-stuff is more or less vice-versa :)
[13:39:33] * Xark notes Digikey has LPC810 for $3.10 unit 1
[13:39:35] <Shavik> I'm about 90% 8 bit AVRs at work
[13:39:37] <Jartza> 10% arm, 80% avr, 10% other
[13:39:50] <Shavik> About the same at home too so I'm trying to branch out
[13:40:06] <Shavik> Trying to break through that initial wall of a "new" "everything"
[13:40:17] <Jartza> currently I have 3 customer projects ongoing... every project is using M4 :)
[13:40:40] <Jartza> Shavik: going for bare metal or some OS?
[13:40:47] <Jartza> like freertos etc.
[13:40:48] <Shavik> I'll probably bare metal
[13:40:53] <Shavik> I like that
[13:41:05] <Jartza> ohh.. have fun :D
[13:41:07] <Shavik> I've toyed with writing my own OS before on X86 and all my work chips are bare metal
[13:41:12] <Jartza> I like bare metal too, to some limit
[13:41:25] <Shavik> Yea. I tend to stick to a chip because I have tons of my own libraries
[13:41:41] <Shavik> At work we use 100% my own code from serial libs, shift reg drivers, etc
[13:41:50] <Shavik> It really really helps when "wierd" things happen
[13:41:56] <Jartza> sure
[13:41:57] <Shavik> but yea, I agree it's a ton of extra work that might not be w orth it
[13:42:15] <Shavik> I am an avid fan of google and stack overflow :)
[13:42:17] <Jartza> stm32 has quite ok peripheral libs
[13:42:19] <Jartza> not perfect, but ok
[13:42:31] <Jartza> kinetis has their ksdk... that's crap on top of shit
[13:42:33] <Jartza> :D
[13:42:48] <Jartza> kinetis... nice chips if you only look at the features and price
[13:42:55] <Jartza> everything else.... PAIN
[13:43:07] <Shavik> Would I be dumb for wanting to stick with Atmel M0's for now?
[13:43:24] <Shavik> I think I may try my hand at my own dev board but heavily relying on eval schematics
[13:43:37] <Shavik> Just so I can have some custom stuff on v1 that I won't have to breadboard to it
[13:51:00] <Shavik> Thoughts on EEPROM in the CPU or just stick to external EEPROM?
[14:07:41] <LeoNerd> No need to use an external one if the internal one is sufficient
[14:23:41] <Shavik> LeoNerd, it just seems that most of these Cortex M0+ SAM's don't have EEPROM at all
[14:23:48] <Shavik> Guess it just comes down to whether I need EEPROM or not :D
[14:26:29] <Shavik> wow. Just looked at the PWM channel count of these cortex m0's.. kinda not even comparable to the 8bit avr's lol
[14:26:34] <Shavik> used to like 3 maybe 4
[14:26:38] <Shavik> 12-20 seems normal
[14:59:56] <Jartza> SAMs are quite nice all-in-all
[15:00:12] <Jartza> although I prefer stm32 in hobby projects
[16:21:57] <rue_house> the m324 has 6 pwm cahnnels
[16:22:01] <rue_house> iirc
[16:27:00] <WormFood> http://wormfood.net/avrbaudcalc-testing.php <-- the colors are still screwed up, but everything else is done. My new format matches the Atmel datasheets, for more current AVRs. Anyone have any comments or suggestions? If you mouse-over the error rate, it will give you the actual bit rate now.
[16:27:49] <rue_house> wonder if a pwm rate calc would be an idea for one day
[16:28:10] <WormFood> What would you want it to do?
[16:28:42] <rue_house> given osc freq, work out pwm freq with different prescalers and TOP values
[16:29:17] <WormFood> There are formulas to calculate that, right?
[16:29:21] <rue_house> I think one would have to specify the osc, and prescaler
[16:29:25] <rue_house> yea
[16:29:49] <rue_house> for a max top value, its just the clk freq / prescaler / rollover
[16:30:05] <rue_house> if I could think I could say it all
[16:30:07] <WormFood> The hardest part about making a calculator, like my baud rate calculator, is how to organize things, and display the information.
[16:30:15] <rue_house> yup
[16:30:39] <WormFood> Give me your ideas, on how you think it'd be good to lay it out.
[16:30:45] <rue_house> I'm sorry, my brain has completely shut down right now
[16:30:51] <WormFood> and, maybe I'll make something for ya ;)
[16:31:13] <rue_house> the partial vision is a table with different top values, and the pwm freq's that would result
[16:31:32] <WormFood> I found a lot of bugs in my calculator, when I was going over my code. Real subtle things, that most people wouldn't notice.
[16:31:56] <rue_house> ? oh, the values always seemed to work for me
[16:32:11] <WormFood> I just have 2 more things to do, and they're related, and trying to figure out the best way to handle what I want to do.
[16:32:16] <WormFood> Yeah, the values are good.
[16:32:44] <rue_house> having the custom freq table on the end of everything else was annoying
[16:32:48] <WormFood> There were bugs in the color display, and it seems they changed how they calculate the error rate, so I updated that too.
[16:33:06] <WormFood> Well, I added the checkbox, to remove all other tables, so that should help.
[16:33:27] <WormFood> And, I fixed that for you quite a while ago.
[16:33:41] <WormFood> now the custom table shows up as the 1st one. :P
[16:34:02] <WormFood> and it's been that way for a while now. Probably at least 2 years.
[16:34:41] <rue_house> maybe it just stuck in my head
[16:35:04] <rue_house> I'v been using 16Mhz and 9600 baud so long, I dont know when I last worked out a custom rate
[16:35:07] <WormFood> I'm using the ATmega640/1280/1281/2560/2561 datasheet, for my bit rate calculations, and format.
[16:35:24] <rue_house> but I got a bunch of 14.47? Mhz a while ago
[16:35:44] <rue_house> so I can go up to 115200 clean
[16:36:00] <WormFood> I matched the layout of the datasheet exactly, except for the inclusion of the UBRR in hex.
[16:38:24] <WormFood> let me tell you, making the bit rate come out properly with the decimal point, was way more work than I ever expected.
[16:39:24] <WormFood> I'm still not happy with the way I did it, but I can't think of a better way to do it.
[18:22:25] <Evidlo> Jartza: So is this code only demodulation right now?
[20:00:59] <Duality> hi
[20:01:17] <Duality> any idea how to reverse enginear a diode matrix say in a keyboard/piano
[20:01:19] <Duality> ?
[20:01:46] <tpw_rules> trace it?
[20:01:50] <tpw_rules> are you sure it even has diode
[20:01:59] <tpw_rules> it likely doesn't
[20:02:57] <Duality> there are lots of diode's on that pcb :D
[20:03:04] <tpw_rules> ah yeah
[20:03:13] <tpw_rules> do you have the thing it's attached to?
[20:03:20] <Duality> it probably has velocity cause there are twice as many diodes as keys
[20:03:44] <Duality> you mean the controller board ?
[20:03:47] <tpw_rules> yeah
[20:03:50] <Duality> no
[20:03:53] <tpw_rules> oh
[20:04:27] <tpw_rules> i think you'd have to trace is
[20:04:27] <tpw_rules> it
[20:05:25] <tpw_rules> http://www.instructables.com/id/Figuring-out-a-Key-Matrix-Scan-Matrix/ here's a random instructable. i've never done it before, only interfaced with them
[20:08:56] <Duality> hmm never thought of just looking at the trace's to figure it out :D
[20:35:03] <Evidlo> What do the diodes do?
[20:35:36] <Evidlo> How does that give you velocity?
[20:37:43] <tpw_rules> may have two switches
[20:37:49] <tpw_rules> per key
[20:37:54] <tpw_rules> which means two diodes per key
[21:03:13] <Duality> Evidlo: well it uses to switches to time the key and from that it calculates your velocity.
[21:03:17] <Duality> two
[21:03:42] <Duality> e.g. how fast the key is moving
[21:03:55] <Duality> so you can play with more or less volume when you hit the key harder or softer
[21:24:13] <Shavik> WormFood, +1 for me liking a PWM calculator. I think it'd be handy. I have used your baud rate calculator in the past and found it a handy reference. Thanks for your work :)
[22:34:50] <Evidlo> Jartza: You haven't already written modulation code, have you?