#avr Logs

Mar 11 2019

#avr Calendar

12:26 AM davor_ is now known as davor
12:47 AM day_ is now known as day
01:01 AM gsi__ is now known as gsi_
04:57 AM Ad0: hello :)
04:59 AM cehteh: morning
08:33 AM rue_bed2: hey
08:33 AM rue_bed2: --
11:16 AM paulo_ is now known as Guest23697
11:32 AM polprog: /dev/void is like dev null, ecept that if you try to read it, it reads you :P
01:06 PM XenophonF: hey is this the right place to ask AVR microcontroller programming questions?
01:07 PM cehteh: yes
04:09 PM JoeMooCow is now known as JoeLlama
04:27 PM XenophonF: I want to build an AVR project from the provided sources, namely https://code.google.com/archive/p/adapt-ffb-joy/.
04:28 PM XenophonF: It targets the Teensy 2.0.
04:28 PM XenophonF: While I was able to find the necessary programming tools (Arduino IDE + Teensyduino), the project itself looks like it might use a different toolchain.
04:30 PM XenophonF: There are Windows paths in the project files, such as joystick.aws.
04:30 PM XenophonF: That file is in XML format and starts with an <AVRWorkspace> element.
04:30 PM XenophonF: Any ideas what IDE that might be?
04:31 PM XenophonF: Atmel AVR Studio, maybe?
04:32 PM polprog: likely
04:32 PM XenophonF: ok
04:33 PM XenophonF: well, I'm going to dive into its documentation then
04:34 PM XenophonF: thanks :)
04:34 PM polprog: ive no idea how avr studio keeps source files but you can most likely grab all the sources and build using gcv
04:34 PM polprog: gcc*
04:35 PM polprog: avr studio uses gcc itself so it should be easy
04:37 PM XenophonF: I would like to eventually be able to build this on Windows, Linux, or FreeBSd
04:37 PM XenophonF: so that's good to know
04:37 PM polprog: tbh windows may be the most difficult if you need newish gcv
04:37 PM polprog: gcc*
04:37 PM polprog: damnit. phone keyboard. excuse me heh
04:37 PM XenophonF: no worries :)
04:39 PM XenophonF: I'm pretty new to the whole AVR/Arduio ecosystem, like so new I just today found out that "AVR" and "Arduino" aren't synonymous
04:39 PM XenophonF: so I'm just looking for a starting point
04:40 PM XenophonF: I'm still trying to read through and understand the code, although it works beautifully with my old analog joystick :)
04:41 PM polprog: good !
04:42 PM polprog: ive spent some time using avrs. trying stm32 right now, as free time lets
09:02 PM rue_mohr: polprog, was I helping you or you helping me?
10:24 PM cehteh: how was it with AVR's when an interrupt returns at least one non isr instruction is served before the next (pending) interrupt is served or?
10:24 PM rue_mohr: thats a new question
10:25 PM rue_mohr: I'm not sure
10:25 PM cehteh: me neither, i just remmeber there was something
10:26 PM cehteh: still thinking about some way to detect overload conditions and back off then, (stalled ISR's)
10:27 PM * cehteh reads datasheet
10:28 PM rue_mohr: easy, NO loops in ISRs
10:29 PM cehteh: When the AVR exits from an interrupt, it will always return to the main
10:29 PM cehteh: program and execute one more instruction before any pending interrupt is served.
10:30 PM cehteh: .. rememebered right
10:30 PM cehteh: that doesnt help me
10:30 PM cehteh: the no loops thing
10:30 PM cehteh: i have to do some integer division which loops
10:31 PM cehteh: i am thinking to offload it to non isr code and push the next values preepitively to some small (4 elements or so) queue
10:32 PM cehteh: but that wont help much either way, i gain that it can be interrupted, but at worst the queue runs dry plus i have some additional scheduling overhead
10:33 PM rue_mohr: NO
10:33 PM rue_mohr: no, dont do division in the ISR
10:33 PM rue_mohr: get the data and GET OUT
10:33 PM cehteh: actually i implemented some fast trac isr's which dont call the scheduler when done (woken up the µC) just go to sleep again
10:34 PM cehteh: i dont get data there i generate data :)
10:34 PM rue_mohr: well pass some flags
10:34 PM cehteh: as in?
10:34 PM cehteh: i have to do that damn calculation once per isr .. no matter what
10:34 PM rue_mohr: well now cant write it for you can I
10:35 PM rue_mohr: use the isr to set a flag that the new PID value needs to be calculated
10:35 PM cehteh: yes so whats the gain?
10:35 PM rue_mohr: if you setting the flag and its still set, you just ran out of time
10:35 PM cehteh: yeah
10:35 PM cehteh: doing that for some other part already
10:36 PM cehteh: but here i really need to calculate that value and set it
10:36 PM cehteh: no matter what, no fail .. it really must been set
10:37 PM cehteh: 'usually' it mets the timeframe, but i want to detect when timing gets tight (lets say because lower prio UART does some stuff)
10:38 PM cehteh: this is still stepper motor control, accelerating ... when i figure out that timeing gets tight i can just back off and stop accelerating, thats ok, dont run at maximum speed then
10:39 PM cehteh: so i am in control of the timing, i only want to figure out some way to detect when the timing gets tight
10:40 PM cehteh: original plan was to have the 'max speed' just conservatively set that it will never miss the timing
10:41 PM cehteh: but it would be smarter to detect that at runtime
10:48 PM rue_mohr: cehteh, uh
10:48 PM rue_mohr: would you be able to source me 3 stupid large stepper motors stupidly cheap? cause they aren't to spec anymore?
10:49 PM rue_mohr: big enough for a 4' x 8' cnc machine?
10:49 PM cehteh: lol
10:49 PM rue_mohr: its probably worth asking...
10:49 PM rue_mohr: I'm gonna do DC servomotor at this rate
10:49 PM rue_mohr: but it'l;l ba a challange
10:50 PM rue_mohr: 3 optical resolvers would make my life a lot easeri
10:50 PM cehteh: i dont have any by myself ... only cheap small ones here
10:51 PM cehteh: running code w/ scope and logic analyzer ... helps more than having real steppers
10:52 PM cehteh: i wish for myself to have a nice CNC :D
10:52 PM cehteh: maybe someday
10:52 PM cehteh: anyway this is not for a cnc
10:53 PM cehteh: optimize for speed and endpoints (acceleration/deceleraton) i dont need to care for the path taken
10:54 PM cehteh: but very high precision, microscope positioning/automatic scanning
11:06 PM cehteh: mhm stupid question #2 since it always executes one instruction when returning from isr, what happens when thats a sleep instruction, does it go to sleep just to wake up .. i hope at least that wont happen
11:50 PM [1]MrMobius is now known as MrMobius
11:56 PM [1]MrMobius is now known as MrMobius