#avr | Logs for 2015-10-06

Back
[00:43:48] <Bushman> zulusbg: remote control interface for old mobility scooter/electric wheelchair
[00:45:51] <Bushman> zulusbg: if you are asking for very specific details of why i'm doing this project, i'm doing it for theatre. They will use the base of this mobility scooter as mobile platform for moving decorations
[01:22:21] <zulusbg> Bushman so you make like loading platform
[04:10:41] <Bushman> zulusbg: i'm not sure i understand what you mean by "loading platform". google images seems to think it's something else.
[04:10:56] <Bushman> zulusbg: but this should give you more insight:
[04:11:00] <Bushman> this: http://home.btconnect.com/DRIVEABILITY/images/elec_wheelchair2.jpg
[04:11:40] <Bushman> into this: http://cdn.instructables.com/FYV/IXLP/GHSYTQ09/FYVIXLPGHSYTQ09.MEDIUM.jpg
[04:11:53] <zulusbg> you mod that to move decorations
[04:11:55] <zulusbg> yeah
[04:11:56] <zulusbg> i got the idea
[04:13:10] <Bushman> which effectively will be for things like this: http://www.instructables.com/id/Electrobite-an-Electric-Wheelchair-Conversion/
[04:13:20] <Bushman> only exchangable
[04:13:49] <Bushman> yea. and my part in this whole project is just the RC system
[04:14:27] <Bushman> so all i did was to build remotely controlled analog joystick emulator
[04:18:33] <Lambda_Aurigae> looks fun...been done before, but looks fun.
[04:18:48] <Lambda_Aurigae> heck, I have a commercial product that does what you just did there. but good work.
[04:21:02] <Bushman> Lambda_Aurigae: well, you're late to the party!!1 :D
[04:21:17] <Lambda_Aurigae> no,,early this morning for me.
[04:21:19] <Bushman> i was looking for a comercial product that would do that. no luck
[04:21:26] <Lambda_Aurigae> been up for an hour..is now 4:00am.
[04:21:38] <Bushman> that's not what i mean
[04:21:39] <Lambda_Aurigae> vex robotics controller setup will do it.
[04:21:48] <Bushman> i'm joking you should sell this to me 3 days ago XD
[04:22:46] <Lambda_Aurigae> remote control unit feeding a microcontroller based robot controller.
[04:23:13] <Lambda_Aurigae> easy to get simple output like your youtube video showed....
[04:24:43] <Bushman> i know it's easy... for an experienced programmer
[04:25:31] <Bushman> but that was my first time consciously using interrupts
[05:31:08] <kre10s> hi. I'm trying to build avr32 binutils, but make is failing when trying to build the docs. Can i turn those off?
[06:08:36] <kre10s> Is it normal for the binutils package to throw errors? like write.c:409:24: error: ‘dummy.fr_type’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
[06:14:31] <Lambda_Aurigae> no. not normal
[06:46:47] <kre10s> I downloaded the prebuilt avr32 toolchain, and the headers to go with it. I remember I had to copy the headers to a specific location to allow avr32-gcc to find them. anyone know where that might have been?
[06:48:00] <Lambda_Aurigae> no clue.
[06:48:22] <Lambda_Aurigae> never got avr32 toolchain to work.
[06:49:23] <Lambda_Aurigae> ended up using atmel studio with the toolchain on winblows
[06:50:17] <Lambda_Aurigae> was a waste of resources so i blew away that vm
[06:50:46] <Lambda_Aurigae> need to try it on linux again though.
[06:51:16] <Lambda_Aurigae> not happening now, however.
[06:52:05] <Lambda_Aurigae> I'm 50 miles from this computer, remoted in with teamviewer from my phone.
[06:55:22] <kre10s> Ah. I got it to work. worked around with a -I/path/to/avr32/headers/ ;)
[06:55:26] <Lambda_Aurigae> have you tried google?
[06:55:36] <Lambda_Aurigae> i see.
[06:56:43] <kre10s> The prebuilt toolchain has never not worked for me before. This time I wanted to build from source, but it seems the source is not up to snuff.
[06:58:15] <Lambda_Aurigae> they always screw with it.
[06:58:16] <Tom_itx> so neither way works
[06:58:26] <kre10s> there is no configure flag to turn off the docs, and if you don't have all the tex dependencies its a pain in the ass.
[06:58:53] <Lambda_Aurigae> try building pic32 toolchain.
[06:58:59] <kre10s> Then when you compile you have to remove -Wall from the makefile.
[06:59:05] <Lambda_Aurigae> it is based on gcc
[06:59:14] <Lambda_Aurigae> source available.
[06:59:30] <Lambda_Aurigae> but all kinds of a pain to build.
[06:59:40] <kre10s> I got it to compile this way, but installing throws errors, because no docs.
[06:59:54] <Haohmaru> anything pic is a pain
[07:00:09] <kre10s> yea.... i don't even bother with pic
[07:00:22] <Lambda_Aurigae> they build in a hack to make it limited without license.
[07:00:31] <Lambda_Aurigae> i like pic32
[07:00:45] <Lambda_Aurigae> is a mips32 core.
[07:01:19] <Haohmaru> some of their chips are okay.. but using them is.. wtf
[07:01:32] <Lambda_Aurigae> when i can get a 32bit processor that can execute from srsm in a dip package...life is good
[07:01:51] <Lambda_Aurigae> srsm/sram
[07:02:11] <Lambda_Aurigae> dabnaggit...typing on cell today..
[07:02:26] <kre10s> you are making architecture choice based on package availability?
[07:02:29] <Lambda_Aurigae> remoted to home computer via teamviewer.
[07:02:52] <Lambda_Aurigae> kre10s...yes...for hobby work.
[07:03:08] <kre10s> It's not that hard to do smd. even as a hobby.
[07:03:21] <kre10s> as long as the pitch isn't too bad, or BGA.
[07:03:25] <Haohmaru> tell that to my wiggly hands
[07:03:29] <Lambda_Aurigae> and teaching kids in the range of 10 to 16.
[07:03:45] <kre10s> breakout boards! yay!
[07:03:59] <kre10s> bake at home, take to school :P
[07:04:24] <kre10s> as an instructor, i assume you won't get arrested?
[07:05:35] <Haohmaru> hey wait a minute..
[07:05:52] <kre10s> lol. If I hold a pair of tweezers without resting my wrist on the table I have at least +/- 1mm of gitter.
[07:06:09] <Haohmaru> 1mm?
[07:06:15] <Haohmaru> u like a robot, maan
[07:06:36] <Haohmaru> i'm like grandpa
[07:07:20] <Lambda_Aurigae> breakout boards cost.
[07:07:48] <Lambda_Aurigae> pic32mx270f256b in dip i can get as free samples.
[07:08:07] <Lambda_Aurigae> 64k sram 256k flash
[07:08:28] <Lambda_Aurigae> i teach kids as a hobby.
[07:12:16] <Lambda_Aurigae> wifey is going into surgery in about 20 mins
[07:12:43] <Lambda_Aurigae> i am sitting in hospital waiting.
[07:31:04] <kre10s> aarrrg. that must be nerve racking.
[07:39:27] <Lambda_Aurigae> not too bad
[07:39:51] <Lambda_Aurigae> elective gastric sleeve
[09:49:08] <gorroth> so my AVR code is getting a little bit sexier. i wrote a uart_setup_stdout(); function so that it can redirect the stdout stream to the UART device
[09:49:17] <gorroth> i know that is probably common practice, but i think it's sleek
[09:50:47] <LeoNerd> Mhmm
[09:50:48] <LeoNerd> It's cute
[09:51:00] <LeoNerd> Would be cuter if printf() didn't randomly reset the CPU too
[09:51:20] <gorroth> it does?
[09:51:34] * gorroth hasn't actually tried printf on the AVR yet
[09:53:45] <gorroth> i'm actually going to rewrite the code a bit so it returns the old stdout, in case you want to go back to whatever you were previously doing with stdout after you print some data to the uart
[10:19:37] <twnqx`> it would be could if printf was actually usable
[10:19:39] <twnqx`> e.g. nonblocking
[10:19:53] <twnqx`> cute*
[10:21:20] <FL4SHK> twnqx`: You may want to use open(), read(), write(), etc.
[10:21:24] <FL4SHK> Those can be nonblocking
[10:21:30] <FL4SHK> However, I've also heard of fdopen()
[10:22:04] <twnqx`> on... avr?
[10:22:07] <FL4SHK> Oh, oops
[10:22:17] <FL4SHK> Yeah, I'm derp
[10:22:52] <twnqx`> the blocking time for ptinf() on a pc is irrelevant, compared to pritnf to serial port on AVR :P
[10:23:30] <gorroth> hmm, i do use open/read/write in O_NONBLOCKING
[10:23:45] <FL4SHK> I don't know much about real AVR coding because I use Arduinos and the IDE (though I only use the IDE to upload code; I use vim for editing)
[10:23:52] <twnqx`> ... and you think that avr does honor that?
[10:23:54] <gorroth> anyway, it's just an api i'm providing. people can use it if they want that kind of thing
[10:23:56] <twnqx`> without OS etc?
[10:24:03] <FL4SHK> open(), write(), read(), etc. are POSIX things
[10:24:12] <FL4SHK> I doubt that AVR has much POSIX support, if any
[10:24:14] <twnqx`> posix compliant 8bit micro
[10:24:19] <twnqx`> that could be... interesting
[10:24:21] <gorroth> it has plenty of POSIX support
[10:24:27] <gorroth> libc-avr
[10:24:29] <gorroth> and friends
[10:24:44] <twnqx`> well
[10:24:46] <gorroth> it has the things you'll need there
[10:24:47] <twnqx`> my stance on that
[10:24:52] <twnqx`> ignore that it exists on µC
[10:24:57] <gorroth> no way
[10:25:11] <gorroth> oh, on the avr i don't use open/read/write
[10:25:15] <twnqx`> the overhead of that on such a slow thing is horeendous
[10:25:15] <gorroth> my bad
[10:25:21] <gorroth> depends on what you're doing
[10:25:32] <FL4SHK> twnqx` it probably horrifies you that I write a subset of C++ that is larger than C on AVR :P
[10:25:34] <gorroth> anyway, i don't use stdio and thigns on avr
[10:25:48] <FL4SHK> Not that I use the C++ STL on an AVR
[10:25:48] <gorroth> but stdint.h is nice
[10:25:51] <twnqx`> i don't write C++, ever
[10:25:54] <FL4SHK> That's fine
[10:25:55] <twnqx`> because i despise OOP
[10:25:59] <twnqx`> so, yeah
[10:26:02] <gorroth> and you don't have to do OOP in C++
[10:26:09] <FL4SHK> That's also fine, to not like OOP
[10:26:11] <FL4SHK> I like OOP
[10:26:11] <twnqx`> i am aware of that, tyvm
[10:26:17] <FL4SHK> But I like assembly and stuff also
[10:26:26] <twnqx`> i admit i wish C had namespaces...
[10:26:32] <gorroth> well, if you want to replace complicated macros, C++ can come to the rescue with templates
[10:26:35] <gorroth> anyway, up to you
[10:26:39] <gorroth> you can be scroogey about it if you want
[10:26:44] <FL4SHK> C macros aren't very powerful IMO
[10:26:50] <FL4SHK> I'd love if they were as powerful as assembly macros
[10:26:50] <gorroth> no, they're not
[10:26:57] <gorroth> they're decent, but they're not too powerful overall
[10:27:00] <twnqx`> they are...not?
[10:27:05] <gorroth> no
[10:27:08] <FL4SHK> have you written assembly with macros before?
[10:27:12] <twnqx`> the only thing missing from them is dynamically evaluated conditionals
[10:27:21] <FL4SHK> uhhhhhh
[10:27:32] <twnqx`> compile-time dynamics, of course
[10:27:42] <gorroth> oh, and things like tracking down what went wrong when the compiler emits things. at least templates give you some of that info
[10:27:42] <FL4SHK> But you haven't use assembly macros?
[10:27:47] <twnqx`> and you can kind of emulate that, if you realllly want
[10:28:12] <gorroth> and writing straightforward template code instead of weird macro code that has to handle a million weird cases
[10:28:12] <FL4SHK> powerful compile-time text substitution stuff
[10:28:21] <twnqx`> no, i wrote asm on 6502, z80 and 80486. ever since then, i only write relevant inline functions in asm.
[10:28:43] <twnqx`> like serial bit-bang that needs to be cycle precise
[10:28:53] <FL4SHK> So you're not aware of how freaking powerful assembly macros are
[10:28:56] <gorroth> well, with a template function using template specialization, you can have a lib with all those thinsg, falling back on a default impl if you can
[10:29:00] <gorroth> and it doesn't get weird
[10:29:04] <gorroth> or complicated
[10:29:35] <FL4SHK> even the GNU assembler has good macros
[10:29:39] <FL4SHK> *good macro support
[10:29:48] <gorroth> FL4SHK: are you talking to me?
[10:29:53] <FL4SHK> No, twnqx`
[10:29:55] <gorroth> oh
[10:30:04] <gorroth> i think you are conflating terms :-P
[10:30:07] <gorroth> so i got confused
[10:30:09] <twnqx`> maybe, but assembly is - mostly - pointless to begin with
[10:30:29] <FL4SHK> wow
[10:30:38] <FL4SHK> assembly is fun when the instruction set is well made
[10:30:45] <twnqx`> yes
[10:30:46] <FL4SHK> fun isn't pointless
[10:31:16] <FL4SHK> Sure, if you're writing a PC program, you most likely don't need assembly
[10:31:26] <FL4SHK> And indeed, x86 is a pretty messed up instruction set
[10:31:31] <Jartza> it is
[10:31:44] <FL4SHK> x86 assembly is probably not very fun to write
[10:31:46] <Jartza> but for this project I'm currently doing, assembly is just fine
[10:31:53] <twnqx`> the instruction set is ok, the consequences of ever-growth are horrid :P
[10:31:58] <Jartza> running on attiny5
[10:32:03] <twnqx`> at the limited registers.
[10:32:21] <twnqx`> i see no point it that
[10:32:27] <twnqx`> in writing asm
[10:32:31] <twnqx`> for most things
[10:32:37] <FL4SHK> sure, most things don't need it
[10:32:46] <twnqx`> if you enjoy doing it, don't let me stop you though :P
[10:32:56] <Jartza> I actually enjoy writing it :D
[10:33:07] <twnqx`> i wish more people were able to do assembly, because it shows that you understood the inner workings of a cpu
[10:33:16] <Jartza> and for example my attiny85 vga, couldn't have done it without assembly
[10:33:19] <gorroth> i've had to write asm before, as necessity
[10:33:19] <FL4SHK> It doesn't show you as much as you might think
[10:33:27] <FL4SHK> It doesn't tell you how to build an ALU, for example
[10:33:34] <twnqx`> true
[10:33:35] <gorroth> device drivers need it sometimes, and you also need it if you're on an ARM system and need to enable profile counters on the CPU
[10:33:51] <FL4SHK> ARM is a nice instruction set
[10:33:59] <twnqx`> haven't dealt with it yet
[10:34:05] <gorroth> maybe, i didn't get too into it :) i just had to enable those profile counters once
[10:34:06] <twnqx`> but my next project will be arm!
[10:34:07] <Jartza> I like avr instructions too
[10:34:18] <gorroth> i use compiler intrinsics to do most of what i wanted
[10:34:21] <Jartza> and 6502 :D
[10:34:22] <gorroth> s/use/used/
[10:34:24] <FL4SHK> AVR is one of my favorite 8-bit instruction sets
[10:34:39] <gorroth> AVR is my favorite 8-bit instruction set, because i don't have other points of comparison :)
[10:34:40] <twnqx`> i am writing an emulator for some µC
[10:34:43] <twnqx`> including all the hardware
[10:34:48] <Jartza> 6502 and avr instruction sets actually remind each other quite a lot
[10:34:56] <FL4SHK> odd
[10:34:59] <twnqx`> and i currently am sitting at a show-stoppper because i fail to make a design decision :D
[10:35:01] <FL4SHK> AVR has way more registers
[10:35:09] <FL4SHK> and doesn't have a silly accumulator design
[10:35:14] <twnqx`> you mean, more than one and two semi-registers? :D
[10:35:19] <FL4SHK> yes
[10:35:46] <FL4SHK> I'd rather there have been a better way to do self modifying code in AVR, tbh
[10:35:57] <FL4SHK> running code from RAM would be nice in some cases
[10:36:00] <gorroth> anyone coming out of a CS program should know how to do basic asm
[10:36:00] <twnqx`> i actually built a part (2 bits) of a 6502 ALU in DTL (well, designed... never built...)
[10:36:08] <gorroth> i did it on the MIPS arch back in uni
[10:36:22] <gorroth> and i've taught myself x86, to the extent i needed to know
[10:36:25] <FL4SHK> I'm kind of weird; I'm a mechanical engineering major
[10:36:32] <twnqx`> i wanted to build a full 6502 in DTL
[10:36:35] <twnqx`> but i gave up on that
[10:37:04] <twnqx`> i'd never reach the 1mhz to plug it into a c64 and see it RUN
[10:37:05] <gorroth> and AVR emu would be nice, if it doesn't exist already
[10:37:11] <FL4SHK> it does exist
[10:37:11] <twnqx`> several exist
[10:37:14] <FL4SHK> yeah
[10:37:17] <twnqx`> well, at least two :P
[10:37:27] <gorroth> do they work pretty well?
[10:37:31] <twnqx`> no idea
[10:37:48] <twnqx`> emulators don't really work for me as i need to interface them to my IO somehow
[10:38:09] <FL4SHK> yeah, that's one thing I've realized about AVR emulators also
[10:38:16] <FL4SHK> it's hard to get them to understand the I/O
[10:38:22] <FL4SHK> A hardware debugger would be interesting
[10:38:25] <FL4SHK> Do those exist?
[10:38:35] <LeoNerd> dW or JTAG or whatever
[10:38:40] <FL4SHK> I see
[10:40:35] <Jartza> https://github.com/Jartza/attiny85-vga/blob/master/vga.asm
[10:40:41] <Jartza> that's the latest assembly I've written
[10:49:48] <gorroth> yeah, that's why i don't use the emus. i have to connect to UART and stuff
[10:52:34] <gorroth> Jartza: did you do that more for fun than anything else?
[10:53:28] <gorroth> your README.md answered that for me :)
[10:56:52] <gorroth> Jartza: what software are you using for the blog? just wordpress? i ask, because i'd like to do something similar for my avr stuff
[10:56:59] <gorroth> n/m
[10:57:04] <gorroth> i looked at the bottom of the page
[11:05:16] <Jartza> yeah, wordpress :)
[11:05:40] <Jartza> documentation still in progress
[11:05:51] <Jartza> I just have too much to do
[11:06:16] <Jartza> I also made nice "square inch" board for it
[11:06:17] <Jartza> http://gerblook.org/pcb/oHY9uje6CQdi5P2AWPtDvR
[12:14:14] <Strangework> That's a beautiful board, Jartza!
[12:17:04] <Jartza> thanks
[12:17:14] <Jartza> it's for this:
[12:17:15] <Jartza> https://hackaday.io/project/7813-the-square-inch-project
[12:33:15] <gorroth> Jartza: how much did it cost you to get that printed?
[12:37:21] <gorroth> i think i'll setup a mediawiki site on my website to outline the stuff i'm doing, perhaps
[12:41:31] <Jartza> gorroth: 10 pieces $29 (ROHS added cost a bit)
[12:42:37] <gorroth> sounds good!
[12:42:45] <gorroth> i'll be having some boards made by the end of the year
[12:42:50] <gorroth> i'm still breadboarding my design
[12:46:25] <Jartza> http://hackvana.com/guide
[12:46:28] <Jartza> or join #hackvana ;)
[12:46:37] <Jartza> lot of friendly people there to help
[12:46:50] <Jartza> (I made my first board around 1.5 years ago)
[12:59:59] <Lambda_Aurigae> still sitting at hospital.
[13:00:16] <Lambda_Aurigae> wifey came through surgery ok though.
[13:02:51] <gorroth> i'll look into that Jartza ; i'm still far away from it. i haven't even started putting my boards into any pcb design files
[13:03:04] <gorroth> i need to get my motor controller working, and then i will
[13:03:20] <gorroth> i also partly haven't done it because i haven't taken the time to figure my way around kicad
[13:03:53] <Lambda_Aurigae> try eagle
[13:03:59] <Lambda_Aurigae> free version
[13:05:19] <gorroth> i hear it's pretty limited
[13:05:42] <gorroth> i'd rather have room to grow without paying for a license, since this is a hobby right now
[13:05:49] <gorroth> at least until i (possibly) enter a phd program
[13:08:27] <Jartza> gorroth: well, still welcome ;)
[13:08:50] <Jartza> I've found I've gotten sort of hooked to designing PCBs
[13:08:56] <gorroth> hehe
[13:08:56] <gorroth> yeah
[13:09:03] <gorroth> they're going to be life-savers once i get there
[13:09:10] <gorroth> running lots of wires on a breadboard is not the most fun
[13:09:35] <Jartza> indeed
[13:09:51] <Jartza> and I'm still n00b in electronics too, but I've learned a lot in the last 1.5 years
[13:09:58] <gorroth> same here
[13:10:07] <gorroth> i've only been going for about 2 months though
[13:10:18] <gorroth> i did try to do some stuff a few years ago, but i gave up after just a month or two, i think
[13:10:22] <gorroth> i didn't learn a lot then
[13:10:38] <gorroth> this time, i have a purpose for my design, which is why i'm persistent
[13:11:17] <Jartza> and I used free eagle for a long
[13:11:35] <Jartza> now I have license for it, but still most of my boards would be doable with free version too
[13:11:43] <Jartza> so I'm sort of paying for the license "in vain" :)
[13:12:00] <Jartza> most... well, I would say, all of them could be done with free version
[13:14:52] <gorroth> maybe i'll try eagle
[13:14:59] <gorroth> i was thining the license cost was very high
[13:16:50] <gorroth> oh yeah, it's kind of expensive for someone like me
[13:16:53] <gorroth> i'll just get used to kicad
[13:23:31] <gorroth> people on the arduino playground site have completely raped the notes i put up there in the past
[13:23:43] <gorroth> they went from solid notes to "here's some hacky shit you can do, with no explanations"
[13:24:08] <gorroth> oh well
[13:24:16] <gorroth> my new libc-avr approach is better, imo :)
[13:28:58] <Jartza> well, kicad is also nice, if you're not using Mac :P
[13:30:05] <antto> conclusion: using Mac is not nice
[13:31:03] <Jartza> http://gerblook.org/pcb/Rtp22hpBjHZWMjyZwtZZon
[13:31:10] <Jartza> antto: using mac is very nice. eagle works fine on mac.
[13:31:16] <Jartza> kicad sucks on mac
[13:31:27] <Jartza> but I've heard it's nice on linux
[13:31:32] <Jartza> http://gerblook.org/pcb/Rtp22hpBjHZWMjyZwtZZon
[13:31:39] <Jartza> well. this is now 1" x 1" capable
[13:31:51] <Jartza> actually smaller
[13:53:38] <aandrew> lol
[13:53:42] <aandrew> octapentavga
[13:53:55] <aandrew> I'd have called it octapentaveega just to keep the "flow"
[13:54:41] <aandrew> the curvy traces are really doing it for me on this board, very cool
[14:13:04] <Jartza> aandrew: :(
[14:13:07] <Jartza> oops
[14:13:09] <Jartza> :)
[14:13:59] <Jartza> yeah. I believe electrons are happier in curvy traces
[14:14:06] <Jartza> :D
[14:14:34] <Jartza> unfortunately the v1 I ordered still doesn'y have curvy traces, but oh well
[14:29:38] <Jartza> Device: attiny5
[14:29:38] <Jartza> Program: 476 bytes (93.0% Full)
[14:29:39] <Jartza> :D
[14:43:57] <Jartza> https://www.dropbox.com/s/8mz2zaqe7aohlww/Screenshot%202015-10-06%2022.17.03.png?dl=0
[14:44:04] <Jartza> https://www.dropbox.com/s/47ohhhbtb1061ii/Screenshot%202015-10-06%2022.17.50.png?dl=0
[14:44:42] <inkjetunito> three lights and a button?
[14:45:23] <inkjetunito> oh. vga
[14:45:43] <inkjetunito> for the 3x 85 thingy?
[14:46:36] <inkjetunito> more stupid questions?
[14:47:08] <inkjetunito> lack of caffeine?
[14:48:08] <Jartza> :D
[14:48:24] <Jartza> yeah. 8 color vga with 8 corners with attiny85
[14:48:26] <Jartza> hence octopenta
[14:48:34] <Jartza> octa
[15:10:01] <kre10s> Jartza, you SPI these things? using pins on the VGA?
[15:10:12] <kre10s> ISP... derp
[15:11:44] <Jartza> the programming headers for SPI are on the bottom
[15:11:59] <Jartza> or, pads'
[15:12:23] <Jartza> or what you mean?
[15:13:07] <kre10s> what connector do you use to connect with your programmer?
[15:14:43] <Jartza> avx 9188
[15:15:50] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxdVRKWnZBYW5HZ00/view
[15:15:55] <Jartza> and this kind of adapter board
[15:16:02] <Jartza> on the other side of the board is standard 6-pin isp
[15:21:26] <kre10s> neeto~
[15:24:46] <Jartza> yea. just push it against the pads and program
[15:24:53] <Jartza> and "programming headers" come free
[15:24:59] <Jartza> no parts needed on pcb
[15:25:10] <Jartza> already used that in tagsu in production and they were very happy with it
[15:25:24] <kre10s> theres a professional thingy similar, can't remember the name.
[15:27:09] <kre10s> my only qualm with the push on method, is that it doesn't stick. I looked into board edge connectors, but they are ofter really bulky and not practical.
[15:30:42] <Jartza> well, I use simple plastic clip to hold it on place when developing :)
[15:35:33] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxZWdPMVpsNGdHVVk/view
[15:35:34] <Jartza> like that
[15:35:53] <Jartza> 10 of those clips of different size did cost 1.90€ :)
[15:45:32] <kre10s> hahaha. ingenious
[15:48:08] <Jartza> hehe
[15:48:19] <Jartza> atmel accepted my bug report and made a fix :D
[15:48:24] <Jartza> ...to webpage
[15:48:25] <Jartza> http://www.atmel.com/devices/ATTINY5.aspx
[15:48:32] <Jartza> that page used to say 512 kB of flash :D
[18:01:45] <n00b4g33nt00> hi
[18:02:31] <Lambda_Aurigae> what? A whole minute was too long to wait?
[18:10:09] <Casper> a minute?
[18:10:21] <Casper> you mean... 18 seconds?
[18:11:45] <Lambda_Aurigae> well, my client only currently shows hours:minutes.
[18:12:02] <Lambda_Aurigae> I don't have it set for seconds so I was giving him a little benefit there.
[18:13:17] <Casper> [18:37:44] * n00b4g33nt00 (745d815a@gateway/web/freenode/ip.116.93.129.90) has joined
[18:13:17] <Casper> [18:37:55] <n00b4g33nt00> hi
[18:13:17] <Casper> [18:38:02] * n00b4g33nt00 (745d815a@gateway/web/freenode/ip.116.93.129.90) has left
[18:55:13] <Bushman> ave
[18:55:20] <Lambda_Aurigae> maria
[18:55:27] <Bushman> ;]
[18:55:33] <Bushman> who's familar with watchdog settings for 328p ?
[18:55:47] <Lambda_Aurigae> the datasheet.
[18:56:03] <Lambda_Aurigae> ask your relevant question and someone who knows may answer.
[18:56:44] <Bushman> i was hoping to skip the painfull part of reading all the registers and bits :P
[18:56:55] <Lambda_Aurigae> someone has to.
[18:56:59] <Lambda_Aurigae> what is your question?
[18:57:08] <Lambda_Aurigae> other than who knows how to do what?
[18:57:11] <Bushman> anyone can give me a one-liner setup for ~100ms watchdog?
[18:57:13] <Bushman> :P
[19:01:08] <Lambda_Aurigae> if you read the datasheet you will see that there are some simple settings on page 55/56
[19:01:38] <Lambda_Aurigae> and it gives you the various timeouts for the watchdog timer for the 4 bits of settings.
[19:02:40] <Bushman> oh well, time to read :D
[19:02:45] <Lambda_Aurigae> yes.
[19:02:49] <Lambda_Aurigae> you will see it is very simple.
[19:03:17] <Lambda_Aurigae> 64ms or 0.125s border your requirements.
[19:03:46] <Lambda_Aurigae> however, it does change depending on the voltage you are running the chip at.
[19:04:20] <Lambda_Aurigae> page 53 has example code.
[19:04:21] <Bushman> if the change is below ~10% then i'm fine with that
[19:04:35] <Bushman> i think i'll go with 64ms
[19:05:17] <Bushman> my code is pretty small so it shouldn't take longer to go through the whole loop than this 64ms
[19:08:33] <Lambda_Aurigae> try it with that and if it horks hairballs, kick it up a notch.
[19:13:46] <Bushman> well, my interrupts are timing 2ms pulses in 20ms time frame. the main loop goes many times in that time.
[19:14:31] <Bushman> if i'll put the WDT reset in my main loop, there's virtually no chance of it screwing my code up.
[19:14:43] <Lambda_Aurigae> yup.
[19:15:13] <Bushman> what i wonder tho is what will the bootloader do.
[19:15:33] <Bushman> i might have to wipe the bootloader for the final version
[19:15:42] <Bushman> :(
[19:16:30] <Lambda_Aurigae> don't enable the wdt in bootloader mode...enable it in the main program.
[19:16:51] <Bushman> um...
[19:17:11] <Bushman> i don't program the bootloader. it was shipped with the nano board
[19:17:13] <Bushman> :D
[19:17:31] <Lambda_Aurigae> oh.
[19:17:54] <Lambda_Aurigae> another ardweeny.
[19:18:14] <Lambda_Aurigae> :}
[19:18:28] <Bushman> well, it was a shortcut... didn't wanted to build the board so i bought the cheapest one
[19:18:30] <Bushman> :P
[19:18:51] <FL4SHK> How much RAM does an Arduino Nano have?
[19:18:53] <Bushman> and since it had USB upload capability, i went with it for my avr code :P
[19:19:41] <Lambda_Aurigae> am guessing they don't have wdt enabled in the ardweeny bootloader.
[19:19:44] <Bushman> if i'm not mistaken, the 328p has 1k
[19:19:50] <FL4SHK> 1k?
[19:20:19] <Bushman> that's what datasheet says
[19:20:21] <Lambda_Aurigae> 1k bootloader section.
[19:20:44] <Bushman> Lambda_Aurigae: the question is, do they purposefully disable it! (just in case)
[19:21:11] <Lambda_Aurigae> disable?
[19:21:36] <Lambda_Aurigae> when you set the bootloader bits you set the point where the chip starts executing in flash...
[19:21:37] <FL4SHK> I see
[19:21:38] <Bushman> yea. i mean... does system reset clears the watchdog?
[19:21:46] <FL4SHK> That's not enough RAM for what I was thinking of oding
[19:21:52] <FL4SHK> Oh well
[19:22:14] <Lambda_Aurigae> I believe it does clear the watchdog.
[19:22:19] <Bushman> FL4SHK: add SIMM bank XD
[19:22:22] <Lambda_Aurigae> FL4SHK, such as?
[19:22:32] <FL4SHK> The program I've already written
[19:22:48] <FL4SHK> Which works on Arduinos that have more RAM than that but not all of them
[19:23:31] <FL4SHK> I use a large buffer for serial communications
[19:23:32] <Lambda_Aurigae> atmega328p can go up to 2K bootloader section.
[19:23:36] <Lambda_Aurigae> page 291
[19:24:11] <Bushman> Lambda_Aurigae: i think he was asking about RAM
[19:24:17] <FL4SHK> I was
[19:24:17] <Lambda_Aurigae> oh.
[19:24:31] <Lambda_Aurigae> I like the atmega1284p for sram...16K
[19:24:39] <FL4SHK> dang
[19:24:41] <FL4SHK> That's a lot
[19:25:19] <Bushman> FL4SHK: i think i might have been wrong...
[19:25:34] <Bushman> ATmega48A/PA/88A/PA/168A/PA/328/P
[19:25:36] <FL4SHK> Okay
[19:25:42] <FL4SHK> How much RAM do those have?
[19:25:43] <Bushman> 512/1K/1K/2KBytes Internal SRAM
[19:25:45] <Bushman> 2k!
[19:25:46] <FL4SHK> I see
[19:25:55] <FL4SHK> the Arduino IDE uses a lot of RAM
[19:26:01] <FL4SHK> my buffer is close to 1000 kB
[19:26:05] <FL4SHK> er
[19:26:07] <FL4SHK> 1000 bytes
[19:26:07] <Bushman> that's why i don't use it ;]
[19:26:13] <FL4SHK> I wouldn't mind not using it
[19:26:14] <FL4SHK> However
[19:26:22] <FL4SHK> I need USB connectivity
[19:26:29] <Bushman> so?
[19:26:36] <Bushman> i have USB connectivity
[19:26:43] <Lambda_Aurigae> Bushman, with an external usb chip.
[19:26:44] <FL4SHK> How do I do that without the Arduino libraries?
[19:26:57] <FL4SHK> the Arduino libraries can do USB
[19:27:00] <Bushman> Lambda_Aurigae: yes
[19:27:00] <FL4SHK> without extra hardware
[19:27:04] <Lambda_Aurigae> atmega328 doesn't have usb hardware.
[19:27:11] <FL4SHK> Arduinos do
[19:27:14] <Lambda_Aurigae> so you basically get usb-serial
[19:27:16] <FL4SHK> which I need
[19:27:18] <Bushman> FL4SHK: i mean what sort of conectivity are we talking about?
[19:27:21] <Bushman> serial?
[19:27:23] <FL4SHK> yes
[19:27:29] <Bushman> then no problem
[19:27:35] <Lambda_Aurigae> FL4SHK, if it is atmega328 based then it has a second chip on board doing usb-serial connectivity.
[19:27:38] <Bushman> use normal serial and external chip
[19:27:41] <Bushman> like in nano
[19:27:50] <FL4SHK> that makes it more complicated...
[19:28:01] <FL4SHK> the Arduino libraries can do it without external hardware
[19:28:01] <Bushman> how?
[19:28:10] <FL4SHK> there's already hardware on the boards
[19:28:13] <Lambda_Aurigae> FL4SHK, not on an atmega328.
[19:28:16] <Bushman> but you asked about nano
[19:28:19] <FL4SHK> uhhhhhhhh
[19:28:21] <Lambda_Aurigae> aahh..so it is external to the atmega.
[19:28:21] <FL4SHK> oops
[19:28:29] <FL4SHK> I got confused
[19:28:33] <Bushman> it ALREADY HAVE
[19:28:35] <Bushman> it
[19:28:37] <FL4SHK> Does Nano have USB hardware on the board?
[19:28:52] <Bushman> yes
[19:29:02] <FL4SHK> Can it be used without the Arduino IDE?
[19:29:05] <Bushman> serial converter, miniSUB socket, etc
[19:29:08] <Bushman> yes
[19:29:15] <Lambda_Aurigae> I just use pic32mx270f256b and have one chip with usb, no converter needed.
[19:29:16] <FL4SHK> cool
[19:29:19] <Bushman> i'm using it like that
[19:29:22] <Bushman> i'm even using the USB as programmer
[19:29:24] <Bushman> :D
[19:29:30] <FL4SHK> That sounds like it's more complicated, though, tbh
[19:29:53] <Bushman> how?
[19:29:53] <FL4SHK> though I was asking for beinga ble to do more things myself
[19:30:03] <FL4SHK> Seems more complicated to learn how to get everything set up :P
[19:30:20] <Bushman> hahaha. i did all that in under a week
[19:30:30] <FL4SHK> I don't know if I have a week to dedicate to it
[19:30:33] <Lambda_Aurigae> use ardweeny or learn the chip...
[19:30:45] <FL4SHK> uhhhhhhhhh
[19:30:56] <FL4SHK> I'm happy to learn how to use the other stuff
[19:31:22] <Lambda_Aurigae> arduino libs are so horribly written..specially the wiring library.
[19:31:36] <FL4SHK> What does the wiring library do?
[19:31:48] <Bushman> the wiring
[19:31:50] <Bushman> :D
[19:31:52] <FL4SHK> uhhhhh
[19:31:53] <Lambda_Aurigae> digital_write() and similar.
[19:31:56] <FL4SHK> Oh those
[19:31:58] <Bushman> it handles which pin is which
[19:31:58] <FL4SHK> Yeah
[19:32:05] <FL4SHK> I'm already not using those in my project of interest
[19:32:09] <FL4SHK> I'm using the PORTD and whatnot
[19:32:26] <FL4SHK> I read that in and out instructions are how you access those in assembly
[19:34:53] <Bushman> so you pretty much have it covered
[19:35:13] <FL4SHK> What about the Serial library?
[19:35:15] <FL4SHK> How does that work?
[19:35:28] <Bushman> btw, this are my serial routines that i can later use with printf() :D
[19:35:29] <Lambda_Aurigae> slowly.
[19:35:30] <Bushman> http://pastebin.com/5wHwKBsH
[19:36:04] <Bushman> i have no idea what this does tho. i've got this example from my dad XD
[19:36:12] <Bushman> (god i'm lazy!)
[19:36:17] <FL4SHK> Man
[19:36:21] <FL4SHK> My dad doesn't know anything about this stuff
[19:36:24] <Lambda_Aurigae> read, learn, do.
[19:36:31] <FL4SHK> I'm way better at math and science stuff than he was
[19:36:32] <Lambda_Aurigae> neither does mine.
[19:36:42] <FL4SHK> Both my parents have no idea what I'm doing, heh
[19:36:47] <Lambda_Aurigae> but, he is close to 75.
[19:37:46] <Bushman> my is close to 60
[19:38:00] <Bushman> anyway, all i know is this works.
[19:38:07] <Bushman> i just printf() where ever i want
[19:38:14] <Bushman> ;]
[19:38:47] <Bushman> it could be an example he himself got from somewhere
[19:38:55] <Bushman> i don't really know :P
[19:38:56] <Lambda_Aurigae> I've seen it elsewhere.
[19:39:00] <Lambda_Aurigae> or very similar.
[19:39:26] <Lambda_Aurigae> it just makes a uart_putchar which is used by the printf system to send characters.
[19:39:58] <Bushman> yup
[19:40:19] <Bushman> basicaly just feeds the string into the register
[19:40:36] <Lambda_Aurigae> one byte at a time, yes.
[19:42:16] <Bushman> the getchar seems trippy.
[19:42:31] <Bushman> does it just sit there, do nothing untill it gets a byte?
[19:42:51] <Lambda_Aurigae> yup.
[19:43:56] <Bushman> either i'm missing something or there's an interrupt vector code missing in this example.
[19:44:16] <Bushman> i could swear there was an interrupt checking for incoming data on uart
[19:44:28] <Bushman> i'll as dad tomorow
[19:44:31] <Bushman> *ask
[19:44:58] <Lambda_Aurigae> looks like manual checking, not interrupt.
[19:45:49] <Bushman> but i remember using some of his code for serial communication and i was not waiting for characters.
[19:45:55] <Bushman> they were in the buffer
[19:46:31] <Bushman> must be differen't example
[19:46:38] <Bushman> but shouldn't be hard to adapt
[19:49:23] <Bushman> ah, yes...
[19:49:31] <Bushman> RXCIEn: RX Complete Interrupt Enable n
[19:55:04] <Lambda_Aurigae> I'm still using fleury's usart library modified somewhat.
[19:57:17] <Bushman> i seem to have avr/wdt.h included...
[19:57:38] <Bushman> there are some functions for easy disable enable of watchdog
[19:59:37] <Bushman> wdt_enable(value)
[19:59:39] <Bushman> heh
[20:03:27] <FL4SHK> manual checking of serial stuff?
[20:04:29] <Lambda_Aurigae> it's duable.
[20:06:13] <FL4SHK> seems odd
[20:06:19] <FL4SHK> I don't know much about how interrupts on AVRs work
[20:06:30] <FL4SHK> I've dealt with interrupts on some Nintendo consoles
[20:06:38] <FL4SHK> Those were fairly easy to deal with
[20:07:08] <Lambda_Aurigae> if an interrupt condition occurs, and the chip is properly set, the interrupt routine gets called.
[20:07:13] <FL4SHK> Yeah
[20:07:18] <FL4SHK> that's the same as I'm used to
[20:07:25] <FL4SHK> I don't know how to set up the vectors nor what the interrupts are
[20:07:27] <Lambda_Aurigae> much the same on most microcontrollers.
[20:07:38] <Lambda_Aurigae> read the datasheet
[20:07:41] <Lambda_Aurigae> it is all in there.
[20:07:59] <Lambda_Aurigae> and avr-libc helps out with it somewhat.
[20:08:05] <Lambda_Aurigae> read the avr-libc documentation as well.
[20:08:09] <FL4SHK> heh
[20:08:16] <Lambda_Aurigae> and there are dozens of tutorials out there.
[20:09:26] <FL4SHK> How do I do USB serial stuff without the Arduino libraries?
[20:10:00] <Lambda_Aurigae> that entirely depends on the chip you are using.
[20:10:12] <Lambda_Aurigae> if it is one with hardware usb then you use the LUFA library most likely.
[20:10:19] <FL4SHK> that sounds painful to have to deal with
[20:10:32] <FL4SHK> Because the different boards are going to be using different USB hardware, maybe
[20:10:33] <Lambda_Aurigae> if it is an arduino with an external usb-serial adapter then you just use the USART to send and receive serial data.
[20:10:37] <FL4SHK> I see
[20:10:53] <FL4SHK> What about the Arduino Micro? I think that has USB stuff in teh AVR
[20:10:54] <Lambda_Aurigae> they either have a USB-AVR or an external usb-serial chip.
[20:11:07] <Lambda_Aurigae> I don't know what ardweeny uses what..you will need to look that up.
[20:11:21] <Lambda_Aurigae> I don't use arduino...it bugs me horribly.
[20:11:31] <Lambda_Aurigae> and I started with avr long before arduino existed.
[20:12:10] <FL4SHK> I probably wouldn't have gotten into AVR stuff when I did without Arduino
[20:13:04] <FL4SHK> Arduino made it easier for me to get into hardware stuff
[20:13:06] <FL4SHK> :P
[20:13:18] <FL4SHK> Kind of, at least
[20:13:28] <FL4SHK> chances are that I would have gotten into it via other stuff
[20:13:35] <Lambda_Aurigae> 5 wires, an atmega32, a solderless breadboard, a 5V regulator, and a 9V battery.
[20:13:40] <Lambda_Aurigae> that's how I got started with avr.
[20:14:05] <Lambda_Aurigae> 5 wires from the computer to the avr,,,,
[20:14:23] <FL4SHK> USB is easier
[20:14:32] <FL4SHK> I think
[20:14:33] <Lambda_Aurigae> really?
[20:14:41] <Lambda_Aurigae> if someone else has done the work for you, yes.
[20:14:44] <FL4SHK> true
[20:14:57] <FL4SHK> USB is really hard to create new things for if you're not using existing hardware
[20:14:57] <Lambda_Aurigae> which is what arduino is...
[20:15:01] <FL4SHK> I don't like that about USB
[20:15:06] <Lambda_Aurigae> someone else does the hard stuff so you can play with the easy stuff.
[20:15:09] <FL4SHK> I looked into creating a USB device
[20:15:14] <FL4SHK> It's a pain in the neck
[20:15:17] <Lambda_Aurigae> I do it regularly.
[20:15:24] <FL4SHK> Do you use existing USB controllers?
[20:15:25] <Lambda_Aurigae> I just don't use avr for it.
[20:15:38] <FL4SHK> I was thinking more along the lines of creating something with TTL
[20:15:42] <Lambda_Aurigae> I use pic32mx250f128b or pic32mx270f256b chips.
[20:15:51] <FL4SHK> Yeah, so, you use things that can do USB
[20:16:00] <Bushman> well, shit has hit the fan.
[20:16:01] <Lambda_Aurigae> 28pin dip package that fits in a nice solderless breadboard and has hardware usb onboard.
[20:16:26] <Lambda_Aurigae> a good amount of code out there for me to steal.
[20:16:27] <Bushman> i've enabled the watchdog and i can't make my code work back again
[20:16:50] <Bushman> even tho i've already disabled the watchdog
[20:21:30] <Lambda_Aurigae> dunno what to tell you as I'm not sure what you did and didn't undid.
[20:23:03] <Bushman> the watchdog is not cleared after reset and the bootloader is not disabling it either.
[20:23:03] <Bushman> ;/
[20:23:46] <Bushman> ok, i've fixed it...
[20:23:48] <Lambda_Aurigae> odd.
[20:24:29] <Bushman> i had to power-cycle it for the bootloader to start cause reset does not seem to load bootloader
[20:24:34] <Lambda_Aurigae> aahh, yes..
[20:24:38] <Bushman> i mean the watchdog reset
[20:24:39] <Lambda_Aurigae> page 52 explains that.
[20:24:57] <Lambda_Aurigae> you need to reset it in code...so, you need to modify the bootloader.
[20:26:22] <Bushman> it turns out i don't.
[20:26:43] <Bushman> i just by mistake didn't uncomment wdt_reset();
[20:26:49] <Bushman> :D
[20:27:10] <Bushman> or wdt_disable();
[20:27:16] <Bushman> not sure anymore :D
[20:27:31] <Bushman> i'm messing with this code to much
[20:37:02] <Bushman> ok, sleep time!
[20:37:03] <Bushman> g'nite!