#avr | Logs for 2015-09-10

Back
[00:39:16] <gorroth> as far as i can tell, my pwm is running properly
[00:39:32] <gorroth> LEDs are glowing brighter and darker depending on how i set OCR1A and OCR1B
[00:40:27] <gorroth> however, my tight main loop, which has no _delay_ms in it and just increments OCR1A and decrements OCR1B over time seems to take forever to count up
[00:40:44] <gorroth> i'm dum
[00:40:46] <gorroth> dum dum dum
[00:40:52] <gorroth> didn't see the one delay line on the inner loop
[00:41:15] <gorroth> oh yeah
[00:41:17] <gorroth> there we go
[00:41:22] <gorroth> now a sexy light display is going on
[00:41:28] <gorroth> if you can call pulsing lights sexy
[00:48:48] <gorroth> so hawt though
[00:49:17] <gorroth> now i can get the SPI master/slave stuff going, and then we're in business to hook up the motors and start futzing around
[08:33:20] <rue_school> TechChristoph, I offered you my IR code didnt I?
[08:35:26] <rue_school> gorroth, so, if there were a good tutorial on what you did, what would it say?
[09:44:41] <O0ddity> what is the deal with vector type?
[09:46:40] <O0ddity> there is _VECTOR(interrupt id) where you define the interrupt handler...
[09:48:33] <O0ddity> and there is the SIGNAL / ISR macro, or vector function type...
[09:49:00] <O0ddity> Why is it called a vector? are there 2 values?
[09:49:56] <theBear> vector is just a way of saying like, zone/area i spose, ummm, the fucntion type, that's stuff like auto-reset-flag kinda general style of interrupt/return isn't it ?
[09:53:26] <O0ddity> Im reading interrupt.h and it defines SIGNAL / ISR as 'void vector...' and i was woundering if it litterly ment like the type held 2 values
[09:54:13] <O0ddity> its not a C++ std::vector
[09:58:56] <theBear> i was reading that thismorning
[09:58:59] <O0ddity> Its because they are stored in a 2 column table( IV table), right? So there is a interrupt ID and a Pointer to the Handler.
[09:59:16] <theBear> void is like "nothing" and err, vector i spose is just the way they are noted?
[10:00:07] <O0ddity> Yeah
[10:00:12] <theBear> umm, the id is an arbitrary name, and i think (like most cases) that you use the header to attach that name to a real/hardcoded int thingy (ints gotta be hardward-supported in most cases, not just some random address/pointer like a normal sub0
[10:02:33] <O0ddity> hmm, i think you right. it does sound like they are hard coded.
[10:04:39] <theBear> you know at a almost-asm-level how they basically work right ? say it's a timercounter overflow (you might use it for a regular/definate "clock tick" for something in your program... ) you gotta tell the hardware to actually sense when that counter overflows and cut "all normal operations" and instnatly jump to that err, vector and run that time-critical interrupt code.. thus the term INTERRUPT(ing the program) ... and you can set pinchange ones and
[10:04:40] <theBear> rxserbuf full stuff, all stuff that is kinda "special" and hasa to be handled as such
[10:05:16] <O0ddity> ya
[10:25:34] <gorroth> rue_school: well, when i write it up, i'll let you know. basically it would give a rundown of the code i wrote, what it does, how to put the hardware together, and how to use the rpi to program the avr
[10:26:04] <gorroth> and it'd explain why the hardware is built the way it is, since it would be like an advanced "hello world"
[10:33:19] <gorroth> i did make a little video to show up the progress of my robot though: https://goo.gl/photos/Y2uXEqoJYuz4ZYmh7
[10:40:21] <gorroth> https://goo.gl/photos/sW6Amb31gzjD2V7LA -- i heard from others that first link might not work properly, and this one seems to work better
[10:47:19] <O0ddity> its pretty wierd, resizing the window breaks the video for me
[10:49:36] <O0ddity> are you ISProgramming that AVR with the rPi's GPIO pins?
[10:49:52] <O0ddity> gorroth: ^?
[10:50:15] <gorroth> yes, O0ddity
[10:50:23] <gorroth> and yeah, i've heard that the video is having problems for people
[10:50:30] <gorroth> i don't know why; google has done something weird
[10:51:00] <O0ddity> yup
[10:51:04] <gorroth> O0ddity: i'll be writing a whole article (with video) that shows how to do what i've done so far
[10:51:10] <gorroth> i'll put the video on youtube, which will work better
[10:52:49] <O0ddity> That is cool
[11:20:12] <gorroth> thanks, O0ddity :-)
[11:31:23] <lomas> Hello everybody.. I got stuck on reading RFID tag via ATmega16 UART using peter fleury library.. I have connected a LCD. I'm failing in reading the RFID tag and displaying it on the LCD.
[11:31:46] <lomas> anybody please rescue me :)
[12:18:24] <theforcedk> Hi guys - can anyone help me connect my Atmel-ICE to an Attiny85 (ISP) on a breadboard please.. I appear to be missing some kind of board power (light is not on). Light is on if I connect the ICE to my Arduino UNO, so it's working on that. I've been struggling with it for 2 hours now D: thanks!
[12:18:54] <theforcedk> I figured the USB power would be enough, but either it's not, or I'm just not understanding what to do.. the latter might be realistic
[12:19:13] <LeoNerd> Is the ICE supposed to supply target power?
[12:19:29] <theforcedk> That's a very good question.. I can't really find the answer in the manual
[12:19:49] <theforcedk> But it appears not, seeing as it's working on the Uno (with USB power on UNO + ICE connected to USB)
[12:21:43] <theforcedk> In such a case where the ICE is not supposed to - how do I power the Attiny? Connect VCC+GND to VCC and GND on the Attiny85 together with the already connected pins from the ICE? I only have 3.3v cell batteries that I use for whatever projects (previously used USBasp to program it)
[12:33:54] <theforcedk> No.. that's not really working
[14:58:00] <O0ddity> just noticed avr-gcc with the statment: "if (x == 0)" uses a ram var to store and compare 0, instead of 'clr, rXX' it does 'lds rXX'. boo
[15:05:48] <Jartza> well, hard to tell without other code what it should do
[15:06:37] <Jartza> usually gcc seems to use r1 as zero register
[15:07:08] <Jartza> what I wonder is, why it does eor r1, r1 instead clr r1
[15:12:18] <O0ddity> i guess cause they are the same thing
[15:12:46] <Chillum> I index my part number starting at zero
[15:13:02] <Chillum> probably due to my software background
[15:13:41] <Chillum> I can see the logic of starting at 1 though, the 1st resistor makes more sense than the 0th resistor
[15:14:17] <Chillum> on the other hand, 0th seems to be a thing: https://en.wikipedia.org/wiki/0th
[15:17:14] <O0ddity> Yeah but you can't 0 things... can you?
[15:17:55] <O0ddity> How do you "have" it/non-it?
[15:18:55] <aandrew> hm, abcminster doesn't seem to be around much anymore
[15:26:45] <Jartza> O0ddity: well yeah, they do the same thing, but just wondering why :)
[15:32:39] <O0ddity> seeing as'eor rxx,rxx' and 'clr rxx' are the same size opcode wise, I guess sombody decided it was easier.
[15:35:42] <Jartza> or maybe there are some avr chips without clr opcode?
[15:39:43] <Jartza> oh
[15:39:47] <Jartza> they're the same opcode
[15:43:04] <day> im trying to map gps coordinates to a map. is there a way to use gps coordinates without a decimal dot? or in other words can any int like data type handle numbers as long as '231234567'?
[15:44:14] <aandrew> you can represent it any way you like
[15:44:49] <aandrew> you can convert the DMS representation into decimal degrees and then use fixed point math to "move" the decimal point over so you have 9 bits of integer and 29 bits of "fraction"
[15:44:53] <aandrew> I do this a lot
[15:46:32] <day> oh i think unsigned long should work
[16:03:48] <sinclair> hi everyone
[16:05:33] <sinclair> i got an SerLCD from Sparkfun, having a blast after finally figuring out USART and sending text works nicely. now i want to send "special commands" that begin with 0x7C, but i don't really have a clue on how to do that. any clues or suggestions on where to find information about what i'm looking for?
[16:08:24] <aandrew> well why don't you use pastebin.com to paste (part) of your code which displays a string, and then describe what 0x7c command you want to send and we can help
[16:27:30] <sinclair> oh sorry i solved it. thank you anyway sent unsigned char, tried with uint8_t and it worked :)