#avr Logs

Oct 20 2017

#avr Calendar

12:12 AM BongoShaftsbury: twp_rules sorry stepped away from the pc, not sure on the exact data rate requirements atm, and yeah more than likely LOS
12:15 AM BongoShaftsbury: and point to point yeah. i'd be surprised if we needed to transmit more than 256 bytes / s
02:38 AM JanC is now known as Guest77018
02:38 AM JanC_ is now known as JanC
04:25 AM charlie__ is now known as twnqx
05:00 AM NoHitWonder: anyone here used small msp430's?
05:00 AM NoHitWonder: how do they compare with attiny's?
05:01 AM NoHitWonder: those ti launchpads are cheap as hell
05:03 AM Emil: NoHitWonder: aren't they already better than AVRs
05:03 AM Emil: regarding development I hear that with MSPs it's bearable
05:03 AM Emil: but I have no personal experience
05:30 AM Pi3rrot: MSP430 il similar AVR, toolchain exist with GCC, this is the same stategiy to program (push data in register, read datas in register) i never use lib from Ti...
05:30 AM Pi3rrot: the main goal il low power optimisation
05:31 AM Pi3rrot: very low consommation
05:40 AM Emil: Sounds pretty good
05:47 AM merethan: Is there any way to change fusebytes from appcode or bootcode?
05:47 AM merethan: (xmega32e5)
05:50 AM cehteh: dunno about xmega but not for tiny and not for megas, i doubt that xmega can do that too
05:50 AM theBear: depends which ones they are from memory
05:51 AM theBear: pretty sure the appnote about boottime fine-tuning yer internal osc fer serial and similar timing sensitive purposes twiddles a few fuse bits
05:52 AM Emil: theBear: no
05:52 AM Emil: You cant change fuses fromm code
05:53 AM Emil: Not even in bootloader
05:54 AM merethan: Sucks to be me
05:54 AM theBear: you sure the rc fine-tuning bits aren't fuses ? and if we were fools and wanted to outsmart each other, i'd be thinking about some kinda bootstrap logic-assisted serial or even high voiltage programmer, assuming i had a really good reason to need to program fuses out there
05:55 AM merethan: fuses can be programmed over pdi for xmegas. Thing is, lots of devices in epoxy around here
05:56 AM theBear: why you wanna/needter program the fuses out in the wild world anyway ?
05:56 AM merethan: Because we screwed up :P
05:57 AM merethan: Things with brown-out and stuff
05:57 AM theBear: ahh, it all made sense just a moment before yer finished typing... i had a feeling yer weren't just stressing the epoxy factor for no reason ;-)
05:58 AM merethan: Our device sometimes comsumes a whola bunch of power, draining the atmel of juice, possibly corrupting eeprom writes.
05:58 AM theBear: hmmm, if you had the odd huge bags of surplus spares lying around that i have had the last few years, i'd be tempted (like so very many things... when yer got a hammer in yer hand, everything starts to look like a nail <grin>) to attack the issue with excessive capacitance on anywhich either bits i could still access ;-)
05:59 AM merethan: It is kind of solved already, but the most elegant solution would be fixing the mcu settings.
05:59 AM merethan: Remember the epoxy part theBear?
05:59 AM merethan: Extra caps is not an option
06:00 AM theBear: merethan, the power gotta come from somewhere, or is the future now with you, like err, the swiss and their fancy timepieces before you ?
06:01 AM theBear: not until you end up with a HUGE number of free caps lying around that you notice just how many problems can be solved with their careful application, maybe a bendy wire here and there too, for good luck
06:02 AM merethan: The drop is behind a regulator.
06:02 AM merethan: But nvm
06:11 AM Emil: theBear: OSCCAL isnt fuse
06:14 AM theBear: aww :-( good thing we ain't the kinda people willing to waste an otherwise pleasant evening trying to win such a minor and pointless 'discussion' <grin> must be horrible living the life of a troll
06:15 AM Emil: my sarcasm detector is alternating between genuine and ultra toxic right now ;)
06:17 AM Emil: theBear: the divby8 fuse is also just "set the clock divider to 8" fuse, which you can change afterwards. The OSCCAL you can change by first writing certain bits to that one register to enable fiddling with thay
06:18 AM theBear: heh, that's aiiight, we can get excited about the facts, just so long as we don't spend a much-larger-than-could-possibly-be-worthwhile amount of time and effort letting each other know what our excitedness discovered, and that if we do, we are doing it out of the sheer joy of technical facts and electronickery in general, rather than to spite the other <wink>
06:18 AM theBear: mmm, i remembered the fiddling bit, the details don't really matter i spose, so long as it can be fiddled when it needs fiddlin'
06:19 AM Emil: But anycase
06:19 AM Emil: Takeaway is:you cant change fuses from code
06:19 AM Emil: you need a separate programmer for that
06:20 AM LeoNerd: Speaking of fuses, I should finish off my avr-fuse program sometime
06:20 AM LeoNerd: Because I'm tired of calculating numbers
06:21 AM LeoNerd: Need to work out what the AVR device info files licencing details are though, as to how well I can distribute them
06:21 AM theBear: mmm, i find the final stage in any fuse-assistey process is always lacklustre at best... it's one of those things that you only got a lot of motivation for when it has gone wrong, and steadily less and less interest in once you got it kinda working and not had trouble fer a while :)
06:22 AM LeoNerd: My intention is a program avrfuse that takes arguments a bit similar to avrdude, and outputs a segment of commandline for avrdude
06:22 AM Emil: LeoNerd: you cant patent or stop actual information transfer
06:22 AM Emil: LeoNerd: that is
06:22 AM LeoNerd: So you could avrdude -p m328pb `avrfuse -p m328pb EESAVE=0`
06:23 AM Emil: LeoNerd: so if there's information in a datashit and you have no nda
06:23 AM Emil: LeoNerd: you are free to use that information and write about it
06:23 AM LeoNerd: Righty
06:23 AM LeoNerd: But what I want to do is take the device info XML files and do an automated conversion to a different format, and distribute that in its entirity
06:23 AM Emil: LeoNerd: also header files like the ones avr have are in public domain iirc
06:24 AM LeoNerd: So that -might- be a derivitive work
06:24 AM LeoNerd: Hrm.. oh I could maybe use the header files. I don't think they have enough information though
06:24 AM Emil: LeoNerd: no thats entirely fine
06:24 AM LeoNerd: Hmmm OK
06:24 AM theBear: ooh, very professional heh... i spose they are getting a bit outta hand as the years go on, not just a byte and a half of bits you gotta triple-check before and after you typed the two characters into yer keyboard, as i recall a lot of the bigger newer chips got 18 or 20 bits, MAYBE MORE ! it's waaay over the top, heheh, sometimes i make myself giggle
06:25 AM theBear: and while maybe sarcastic, that was meant in the most friendly possible tone it could be said in
06:25 AM theBear: it really IS waaay over the top, in my waning-with-age enthusiasm's opinion
06:26 AM Emil: LeoNerd: well, actually some aspects can be copyrightable
06:56 AM Guest65540 is now known as A001
07:02 AM merethan: Yay, an another lawyer problem has been uncovered: fusebytes & lockbits
07:02 AM merethan: Emil, factual information cannot be copyrighted in most places.
07:03 AM merethan: I should say, are not covered by copyright. Since it is a right you donĀ“t have to apply for it or something.
07:03 AM Lambda_Aurigae: huh?
07:04 AM merethan: What I am saying is: You cannot copyright something, like you can try to patent something. Copyright is a right you have if you create something no matter who you are.
07:05 AM Lambda_Aurigae: yeah, so?
07:05 AM merethan: LeoNerd, I am not a lawyer but I think you are save parsing those device info files to get those factual information bits.
07:06 AM merethan: And distribute that.
07:06 AM merethan: But the device info files themselves are copyright Atmel so you need permission to do that.
07:06 AM merethan: (Permission from Atmel to distribute the original files)
07:07 AM merethan: (If you even want that, that is)
07:08 AM * LeoNerd nod
07:09 AM LeoNerd: If I can extract the technical information and distribute my own distiled version, I don't need to distribute the original files
07:09 AM merethan: I think avrfuse is perfectly safe to distribute if it is finished :)
07:13 AM LeoNerd: Oh, still a little in progress yet
07:13 AM LeoNerd: The logic all basically works, just I've not actually done the fuse data extraction step so currently it does indeed need those XML files
09:16 AM Emil: merethan: you should check the context
09:16 AM Emil: I said exactly the same thing
09:17 AM Emil: Except that register map header files cant be copyrighted withwe
09:17 AM Emil: either*
09:59 AM weatherall is now known as badweather
03:04 PM Newbie__: Hey everyone, I searched for stm32, and this popped up as avr &stm32. I'm moving deeper into STM's registers. Any chance I could ask questions here? or is this strictly Atmel? Sorry for the intrusion
03:05 PM LeoNerd: Heh; this channel's been dead-quite for the past 3 hours at least. If you were asking about STM32 now I doubt anyone would complain
03:05 PM LeoNerd: Quite if anyone will know the answer though I don't know - doesn't STM32 have its own channel? Maybe better folks elsewhere would know
03:06 PM polprog: this channel seems to gather questions on using foss toolkits for stm
03:06 PM LeoNerd: Yah; perhaps there's a crowd enough of people who'd know. In any case, no harm at this point asking the question.
03:07 PM Newbie__: I haven't found one for stm :( Was wondering the same thing. Its just the examples I'm following are for a smaller processor and they use the DMA interrupt status register, I've tried to access it, but it seems that mine has a low interrupt status register and a high interrupt status register, I'm not sure why there's one for low and high :/. Pretty new to this
03:29 PM polprog: night
03:39 PM Lambda_Aurigae: stm32 channel is ##smt32
03:39 PM Lambda_Aurigae: err..
03:39 PM Lambda_Aurigae: ##stm32
03:39 PM Lambda_Aurigae: but, ask away.
03:39 PM Lambda_Aurigae: have you read the datasheet on your particular chip?
03:41 PM theBear: and if yer get into those other competing similar age/power chips, the channel has a tricky name like #43oh rather than a simple number like the actual chip name
03:41 PM Newbie__: Yep, I've gone through the datasheet and the reference manual and the programming manual as well as the ARM website, they just state that the LISR = low ISR , not much other than that. Gone through the web, but I could have missed something. checking again now
03:42 PM theBear: hmmm, what's an isr ?
03:43 PM Newbie__: Is a register that is triggered when ever an interrupt is pending
03:45 PM Newbie__: Found an stm32 channel! will report back if i figure it out. :)
03:55 PM Newbie__: I figured it out! It seems the ISR has been split into two sections, The ISR use to handle the DMA's streams from 0 to 7, now LISR handles 0 to 3 and HISR handles 4 to 7. Thanks for the input everyone!
03:57 PM theBear: a pending interrupt ? that kinda defeats the whole purpose of interrupts doesn't it ? or oh, int service register/routine... i forget that all but the tiniest of micros have had more than 2 or 3 little interrupts to deal with, and have done for many many years.. funny how tiny new tech can take yer head back in time to things that haven't been remotely 'up to date' for a LONG time
04:04 PM Newbie__: Yeah, the stm I'm using has a NVIC with I think around 129+ interrupts available! use to arduino and renesas so this thing has more than I could ever use!
04:06 PM Lambda_Aurigae: you would seldom use them all anyhow
04:07 PM Lambda_Aurigae: even on an avr, using too many at one time will cause contention and delays.
04:07 PM Lambda_Aurigae: specially on an avr, even...
04:07 PM Lambda_Aurigae: or any low end microcontroller.
04:08 PM Newbie__: Completely agree, just saying, there's a lot more than I thought there would be. like a lot more
04:11 PM Lambda_Aurigae: yup.
04:11 PM Lambda_Aurigae: arm is a whole different world.
04:14 PM day__ is now known as daey
04:16 PM theBear: Lambda_Aurigae, indeed, but with any interrupt system/approach, doing anything without known very relaxed gaps between int's hitting is all about the old rule, keep yer handler as short as possible, ridiculously short, even if you gotta deal with the results of that short 'signal' outside, while yer potentially servicing or at least becoming aware of another one triggering, and of course making sure that yer more-complete outside catcher/handler is aware
04:16 PM theBear: of that possibility and able to deal
04:22 PM Lambda_Aurigae: oh, nothing new to me.
04:22 PM Lambda_Aurigae: I've been known to write interrupt handlers in assembly to set a single bit in a register just to make them horribly short.
04:26 PM rue_mohr: thats all an interrupt should be doing
04:26 PM rue_mohr: only do what you ahve to and GET OUT
04:26 PM rue_mohr: your interrupting someone else
04:26 PM theBear: Lambda_Aurigae, that's the spirit, i shoulda known you woulda been well versed in the golden rule of effective interrupt'ering
04:27 PM Lambda_Aurigae: from many moons before avr existed
04:28 PM Lambda_Aurigae: handle all the heavy lifting in the main() loop.
04:28 PM rue_mohr: I wouldn't say arm is totally different, there are just a lot more hardware systems and they are much more complexly interwoven
04:29 PM Lambda_Aurigae: arm is to avr as windows10 is to dos5.0
04:29 PM rue_mohr: Lambda_Aurigae, for flags set by interrupts, I'll usually increment an 8 bit location, so that I can work out if I'm missing flags being set
04:29 PM rue_mohr: Lambda_Aurigae, mmmmm
04:29 PM Newbie__: This is exactly why im going to the registers! the C code slows down my stuff so much, so the only way ill be able to do this is programming a little deeper than the provided libraries. Assembly is a whole different world tho! Finished my undergrad without following the embedded systems route , so this stuff was pure magic to me a few months ago. But enjoying every step of the struggle
04:29 PM rue_mohr: I have all my stm32F103 examples too
04:30 PM rue_mohr: timers, pwm, adc...
04:30 PM Lambda_Aurigae: rue_mohr, have piles of those and a few bluepill boards too.
04:30 PM rue_mohr: I debug with an io pin
04:30 PM Lambda_Aurigae: same here.
04:30 PM Lambda_Aurigae: sometimes as many as 8 of them!
04:30 PM Newbie__: How long have you guys been programming embedded systems?
04:31 PM Lambda_Aurigae: 16 years here.
04:31 PM rue_mohr: esp since inserting stops will usually derail the operations too badly to be able to est anything
04:31 PM rue_mohr: just a sec..
04:31 PM Lambda_Aurigae: but, was doing programming on x86, 68000 systems, 6502 systems, etc long before that.
04:31 PM rue_mohr: oh, k, my z80 was done in 1996
04:31 PM Newbie__: Damn, Wish I had that level of experience!
04:31 PM rue_mohr: so, just a few years,
04:32 PM Lambda_Aurigae: did a little z80 but not much..not enough to call it experience...more like...oh fuck, look at that.
04:32 PM rue_mohr: 21 years? ... eek...
04:32 PM rue_mohr: the z80 is AWESOME
04:32 PM Lambda_Aurigae: unless you include cpm programming on z80 systems.
04:32 PM rue_mohr: there is a 2nd set of registers, and an instruction that swaps between them
04:32 PM rue_mohr: so all my subroutines would use the 2nd set
04:32 PM Lambda_Aurigae: my entire programming experience goes back to 1983.
04:33 PM Lambda_Aurigae: and in 1985 I built a 4-bit computer from 74xx series chips,,,powered from a car battery charger.
04:33 PM rue_mohr: I started with basic in '89
04:34 PM rue_mohr: Lambda_Aurigae, cool, is any of it still around?
04:34 PM Lambda_Aurigae: input was done with paper strips, first with holes punched in them, later with the squares colored in with pencil and using metal contacts and opamps to pick up the bits.
04:34 PM Lambda_Aurigae: shit,,that stuff got thrown out when I went in the military..my parents thought it was junk.
04:34 PM theBear: damn rue ! i was still in nappies when lambda started out, and even i was banging away the c64 (ooh, fancy hw assisted sprites !) and gwbasic code before 89 :-)
04:35 PM Lambda_Aurigae: I started on trs-80 in basic...then commodore vic-20 and apple-II
04:35 PM rue_mohr: did what computers were supposed to do
04:35 PM Lambda_Aurigae: yup.
04:35 PM rue_mohr: anyhow, cross your fingers, I need to try to coax data off a dvr
04:35 PM rue_mohr: came in cause I need a ext3 drive to do it
04:36 PM Lambda_Aurigae: my 4 bit computer even had a display, of sorts...some 4 bit memory, done in flipflops, with LEDs attached to it in an 8x8 matrix.
04:37 PM Lambda_Aurigae: I cheated for the program memory and actually used an sram chip.
04:39 PM theBear: rue_mohr, silly billy, you should be using some nice coloured cat cable or maybe even a fairly modern looking usb cable for that <grin> coax is for getting the data into the dvr <wink>
06:15 PM day__ is now known as daey
10:09 PM enh: hi