#avr | Logs for 2014-05-10

Back
[01:09:31] <dgriffi> has anyone here written a DTMF generator that's actually accurate?
[01:10:52] <dgriffi> I'm fooling around with Atmel's suggested means of doing it and it's coming out that I should use the same values for 770 hertz and 700 hertz
[06:58:22] <malinus> To test out my weatherstation I put it in the fridge for the night, and sampled all the data on my computer (wireless). http://i.imgur.com/MQnPEyK.png
[07:06:20] <Tom_itx> did it storm?
[07:08:26] <malinus> Tom_itx, heh
[07:09:55] <Tom_itx> that's quite a temp swing inside that thing
[07:10:22] <malinus> I was a bit suprised myself too
[07:10:36] <malinus> But I think that's normal
[07:11:08] <Tom_itx> the fan comes on inside and stirs the air
[07:11:18] <Tom_itx> you should have plotted that too
[07:11:23] <Tom_itx> as a comparison
[07:12:03] <Tom_itx> or do you have an anemometer?
[07:12:36] <malinus> I don't, so it would be impossible. I only have a thermistor.
[07:13:05] <Lambda_Aurigae> I remember calibrating an electronic kit thermometer way back when I was a kid.
[07:13:37] <Lambda_Aurigae> put the sensor in ice water that's been sitting with ice in the glass of water for like 15 minutes so the temp stabilizes at 32F/0C
[07:13:48] <Tom_itx> anyway.. the sun is breaking the horizon so i'm out to take advantage of it
[07:14:03] <Lambda_Aurigae> then put same sensor in a pot of slightly boiling water for your high temp of 212F/100C
[07:14:37] <Lambda_Aurigae> I've been up and about for 3 hours now.
[07:14:38] <malinus> Lambda_Aurigae, I've already did that, but mostly for testing, because I've got the A,B,C constants from the datasheet.
[07:15:30] <Tom_itx> speaking of... windshield cracked yesterday. was sitting in the drive in the sun and 'they' (will remain nameless) decided to wash it and sprayed cold water on it
[07:15:43] <Lambda_Aurigae> must have had a weak spot.
[07:15:50] <Lambda_Aurigae> I've done that many times with no breakage.
[07:15:52] <Tom_itx> or maybe a small chip
[07:15:55] <Tom_itx> me too
[07:16:22] <Lambda_Aurigae> other way, frozen and pouring hot water on it, however, is a sure bet to cause damage 1 in 4 times or even more often.
[07:16:32] <Tom_itx> well that's just stupidity
[07:16:36] <Lambda_Aurigae> yup.
[07:16:42] <Lambda_Aurigae> have seen it happen too many times though.
[07:16:47] <Tom_itx> this was rather unexpected
[07:17:07] <Lambda_Aurigae> I have a crack 90% of the way across my truck windshield.
[07:17:27] <Lambda_Aurigae> but, here in iowa, there are no inspections and so long as you have a windshield you can (mostly) see through they don't care.
[07:17:46] <Tom_itx> we swap cars twice a year to keep the mileage down since i drive alot more so she decided to clean them both while i was working on the yard
[07:17:57] <Lambda_Aurigae> hehe.
[07:18:16] <Lambda_Aurigae> if we had similar vehicles we would do that too.
[07:18:32] <Lambda_Aurigae> but wifey has a ford escape suv and I have a ford ranger 2 seater pickup.
[07:18:47] <Lambda_Aurigae> and she needs the extra seats for her job sometimes.
[07:19:02] <Tom_itx> i'm out..
[07:19:10] <Lambda_Aurigae> pax dude!
[08:34:10] <malinus> Tom_itx, fix your server :3
[08:34:54] <Lambda_Aurigae> what?!?! have
[08:35:00] <Lambda_Aurigae> haven't you mirrored it yet?
[08:35:24] <Lambda_Aurigae> might be his dyndns account
[08:35:35] <Lambda_Aurigae> they deactivated free accounts.
[08:42:13] <Casper> and dyndns will be out of business soon
[08:42:29] <hetii> Hi :)
[08:46:46] <hetii> I try run such rfid reader: http://usgroup.eu/activities/infineon/rfid-lock/#file-main.c my code is in: http://pastebin.com/zRJMa4kr
[08:48:22] <hetii> How I can be sure to get always 5 bytes in right order ?
[08:52:55] <hetii> btw there should be 4 in for loop, but still maybe there is better way to do it ?
[08:58:43] <gchristensen> hetii: most rfid cards have certain start bits and checksum bits, maybe yours do?
[08:59:04] <gchristensen> that way you can throw away known bad reads. another thing to do commonly is do more than one read sequentially before considering it a valid read.
[09:01:49] <hetii> gchristensen: how can i know if my cards have this checksum ?
[09:03:03] <gchristensen> hrm... the checksum might be from the reader. at any rate, look into your reader and checksums.
[09:05:37] <hetii> also i wonder why need set like _delay_ms(500); in main loop otherwise i`m not able get my all bytes.
[09:06:58] <gchristensen> doesn't the uart buffer the input?
[09:08:02] <hetii> in terminal it just print 100 instead my 5 bytes values
[09:08:58] <hetii> current code: http://pastebin.com/sXkrK4GN
[09:11:21] <hetii> and here is the uart lib that I use: http://pastebin.com/KcYb4e1d
[09:14:49] <hetii> Have really no clue what going on there, I fight with it 2 days trying different way libs etc but all the time got similar result.
[09:16:28] <hetii> for eg when i set delay to 150ms i got resutl like: 0 b6 100
[09:17:35] <hetii> for 350 ms sometimes i got right 5 bytes (0 b6 1 c1 13) sometimes just (0 b6 100)
[09:32:13] <Lambda_Aurigae> hetii, sounds like it's taking a while to get the data into the uart...what is your baud rate?
[09:38:59] <Lambda_Aurigae> hetii, that first link I am assuming is not yours but one you are copying?
[09:44:27] <Lambda_Aurigae> hetii, and your atmega8 is running on a 12MHz crystal, yes?
[10:13:28] <hetii> Lambda_Aurigae: baud rate should be 9600, crystal on board is 12Mhz, fuses set to l:0xEF H:0xC9. The first link what I put just show my reader, here if official documentation: http://www.produktinfo.conrad.com/datenblaetter/175000-199999/191553-an-01-en-TOWITEK_UNIVERSAL_RFID_ANTENNE_C_CONTROL.pdf
[12:43:04] <Mous> hello guy i was here before and i asking about reliable time measurement and i figured it out without using the xtal you suggested :)
[13:21:55] <Kev> Mous you can use an external rtc
[13:22:50] <Kev> but I don't know how you think you can have an accurate time measurement without an xtal or an external rtc or something
[13:23:12] <Mous> i got it pretty accurate
[13:23:29] <Kev> with the internal clock ?
[13:23:40] <Mous> with the 32KHz clock yes
[13:24:13] <Lambda_Aurigae> internal 32KHz clock?
[13:24:30] <Lambda_Aurigae> you know that will drift if your voltage changes or the temperature of the chip changes.
[13:24:32] <Mous> external 32KHz crystal clock
[13:24:37] <Lambda_Aurigae> oh.
[13:24:38] <Lambda_Aurigae> ok.
[13:24:59] <Lambda_Aurigae> that should be stable to a few seconds a day.
[13:25:37] <Kev> "i figured it out without using the xtal"
[13:25:46] <Kev> mhh ok
[13:25:48] <Lambda_Aurigae> yeah.
[13:25:51] <Lambda_Aurigae> that's what threw me too.
[13:25:59] <Mous> and with no prescaler
[13:27:08] <Kev> that's 125 OF /sec
[13:27:20] <Mous> with no prescaling it does 1 sec in 128tics so i only needed 100 tics so i have to "skip" 28 of them
[13:27:21] <Kev> it's a round number so it should not be a problem
[13:28:10] <Kev> 32k/256=125
[13:28:26] <Lambda_Aurigae> ummm
[13:28:34] <Thrashbarg> 32768Hz?
[13:28:37] <Mous> and i was skiping them like so http://puu.sh/8GUp4.png
[13:28:46] <Mous> yeah its the 32768
[13:28:50] <Thrashbarg> k
[13:29:01] <Lambda_Aurigae> Kev, that's 128, not 125..typo there?
[13:29:15] <Kev> nah i used 32000
[13:29:28] <Lambda_Aurigae> the crystals are 32*1024Hz
[13:29:45] <Kev> yeah
[13:29:51] <Kev> my bad
[13:30:25] <Mous> so the first col is the actual time the second is the timer tics and the third are the mine tics the fourth is when i was skipping (green means skip) and the last one is only to know when to skip by after 3 and where after 4
[13:32:33] <Kev> why skip when you can do that with simple maths ?
[13:33:20] <Mous> this is more cool :D but you can tell me how because this is the best think i could come up with
[13:33:27] <Kev> lets say you have 85 ticks
[13:33:30] <Kev> 85/128=x/100
[13:33:46] <Mous> yeah that would work
[13:34:16] <Kev> it's the same kind of approximation
[13:36:32] <Mous> sure
[13:38:38] <Mous> but in general mine is more consistent
[13:40:39] <Kev> depends how you do the rounding
[13:40:58] <Kev> i'm fairly sure you can have the exact same thing
[13:42:54] <Mous> the division one goes like so 0,8 1,6 2,3 3,1 3,9 4,7 (rounded 1 2 2 3 4 5) but mine goes like 1 2 3 3 4 5 so would need to round
[13:44:01] <Mous> the normal rounding works best in this case (floor would not be good either ceil)
[13:48:57] <Kev> if you add 0.2 if gives the same result
[13:49:20] <Kev> also i'm not saying your solution doesnt work
[13:49:23] <Mous> hmm yeah
[13:49:52] <Kev> but there's an easier solution without a bunch of ifs
[13:50:07] <Kev> and you only need to compute that once
[13:50:31] <Mous> i was scared by these .x
[13:51:16] <Mous> 6 conditional jumps
[13:51:56] <Kev> oh, asm ?
[13:52:06] <Mous> yeah in asm
[13:52:11] <Kev> ok
[13:52:25] <Mous> some sbrc and sbrs
[13:53:48] <Mous> now i need to figure out how to combine the timer interrupt and joystick to control it
[13:53:59] <Kev> haven't done that in years :/
[13:54:10] <Kev> with an hc11 back in the days
[13:54:37] <Kev> also on x86 a bit
[13:55:17] <Kev> i'm lazier nowadays
[13:55:56] <Mous> my friend took and pc asm this year (uni) and in 4 weeks he said screw it because the guy wants from us to read this 800page long book
[14:00:18] <Thrashbarg> you need dedication to do that....
[14:00:48] <Lambda_Aurigae> lets not learn because it's HARD!
[14:00:54] <Thrashbarg> :P
[14:01:01] <Mous> he is lazy
[14:01:28] <Thrashbarg> commitment can be summed up in a breakfast of bacon and eggs. The chicken was involved, the pig was committed.
[18:36:39] <tfd123> So, I feel like a tool asking this, but my google-fu is all used up.... Anyone know where I can find a "cheat sheet" for the acronyms on the side of AVR pinout diagrams? Totally lost in the meaning of ADC0, PA0, PB1, etc...
[18:37:39] <mdszy> tfd123: I dunno about a cheat sheet, but if you look up the Datasheet you can Control+F all the acronyms you need.
[18:39:34] <tfd123> mdszy: Thanks, kinda figured there was a simple answer... and there it is
[18:40:58] <Lambda_Aurigae> they are in the datasheet...pin description section.
[18:41:06] <Lambda_Aurigae> close to the front of the document.
[18:41:55] <Tom_itx> usually on P2
[18:42:43] <Lambda_Aurigae> hey Tom_itx,,,you lose your dyndns account?
[18:43:43] <Tom_itx> yeah they ditched the free dyndns
[18:43:46] <Tom_itx> moved to another one
[18:43:54] <Lambda_Aurigae> aahh.
[18:43:59] <Tom_itx> zlog
[18:44:00] <Lambda_Aurigae> someone was looking for your site earlier.
[18:44:07] <Tom_itx> try the no-ip.biz one
[18:44:48] <Lambda_Aurigae> http://tom-itx.no-ip.biz:81/ gives me nothing
[18:44:55] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/index.php
[18:45:21] <Lambda_Aurigae> that werks.
[18:45:36] <Lambda_Aurigae> awfully cold at your place though.
[18:45:45] <Tom_itx> how so?
[18:45:52] <Tom_itx> oh those sensors aren't on
[18:45:53] <Lambda_Aurigae> Outdoor: 32.0 (F) / 0.0 (C)
[18:45:54] <Lambda_Aurigae> Indoor: 32.0 (F) / 0.0 (C)
[18:45:57] <Lambda_Aurigae> hehe
[18:52:39] <Tom_itx> i suppose i should edit the topic
[18:54:24] Tom_itx changed topic of #avr to: 'Start here: http://www.avrbeginners.net http://no-ip.biz.org:81/~webpage/ http://www.avrfreaks.net ENCOURAGE PEOPLE OR WE WILL SQUASH YOU.'
[18:54:51] Tom_itx changed topic of #avr to: Start here: http://www.avrbeginners.net http://no-ip.biz.org:81/~webpage/ http://www.avrfreaks.net ENCOURAGE PEOPLE OR WE WILL SQUASH YOU.
[18:54:56] <Tom_itx> stupid quotes
[18:57:52] <Casper> .biz.org ?
[18:57:58] <Tom_itx> go figure
[18:58:04] <Tom_itx> they charge for everything else
[18:58:31] <Tom_itx> i'm a cheapass
[18:58:31] <Casper> your url is wrong
[18:58:55] <Casper> should be in the foo.no-ip.org or something alike
[18:59:27] <Tom_itx> that's the only free one they offer
[18:59:43] <Casper> yeah, you got it wrong
[18:59:56] <Casper> it's foo.no-ip.biz
[19:00:30] <Casper> you forgot the foo part, and added a .org
[19:00:39] <Tom_itx> the link works
[19:00:48] <Casper> it do not
[19:01:13] <Casper> I'm subscribed to no-ip.biz
[19:01:13] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/index.php
[19:01:17] <Tom_itx> do
[19:01:19] <Lambda_Aurigae> not from here it don't.
[19:01:31] <Lambda_Aurigae> but that's not what you put in the topic.
[19:01:31] <Tom_itx> ok well i'll just take the server down
[19:01:35] <Tom_itx> that'll fix it
[19:01:37] <Casper> ya, that one work
[19:01:45] <Casper> the one you set in the topic don't work
[19:01:56] <Casper> http://no-ip.biz.org:81/~webpage/ <=== in case you didn't noticed
[19:02:15] <Tom_itx> it worked here
[19:03:31] Tom_itx changed topic of #avr to: Start here: http://www.avrbeginners.net http://tom-itx.no-ip.biz:81/~webpage/index.php http://www.avrfreaks.net ENCOURAGE PEOPLE OR WE WILL SQUASH YOU.
[19:03:53] <Tom_itx> better?
[19:04:08] <Casper> ahhh yes
[19:30:27] <antto> all your topicz are belong to us
[21:33:23] <dgriffi> how much of a problem is it to convert code written for Imagecraft to something that will build with avr-gcc?
[21:39:39] <malinus> what is imagecraft?
[21:40:51] <malinus> hahaha... okay let me get this right: people pay $1500 for somethin they could have for *free*?
[21:40:54] <dgriffi> I want to compile the atmega32 code posted here: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=142639
[21:41:50] <dgriffi> but more realistically, I want to convert it to avr-gcc
[21:42:03] <dgriffi> and from there get it to work for an atmega8
[22:07:15] <Casper> dgriffi: still, what is imagecraft?
[22:12:05] <dgriffi> some other C compiler for AVR
[22:12:51] <Casper> it shouln't be too difficult
[22:13:10] <Casper> probably have to change the interrupt routine name and some register names