#avr | Logs for 2012-12-28

Back
[02:39:48] <SethHope> Hello
[02:41:43] <OndraSter_> helooo
[02:42:19] <RikusW> ctek multi xs 7000 battery charger contains a mega48
[02:42:41] <RikusW> hi
[02:43:21] <OndraSter_> hi
[02:43:22] <tobbor> Hello OndraSter_
[02:43:24] <OndraSter_> ..
[02:43:32] <OndraSter_> RikusW, HTC HD2 contains atmega88 ;)
[02:43:43] <OndraSter_> it connects the sensors to the main SoC
[02:44:51] <RikusW> I opened a broken ctek, seems the output diodes shorted
[07:07:11] <iSaleK> Is there a site where I can check wich replacement transistor I can use for one that I can't get anymore?
[07:08:13] <darknite> iSaleK: usually just googling partnumber+replacement is enough
[07:08:37] <darknite> sometimes adding "dropin" kan help, shouldn't be an issue with transistors though
[07:10:26] <iSaleK> Well I need C5103 (60V 5A). It's used for the inverter in monitor but I can't find the replacement :\
[07:31:35] <jacekowski> iSaleK: there is parametric search on digikey or farnell
[07:33:51] <iSaleK> thank you :)
[10:07:22] <jadew> here's a question for you guys: how happy are you with your schematic capture / pcb design software? and what suite are you using?
[10:07:48] <jadew> personally I find all of them to be in the range of bad to awful
[10:08:11] <jadew> especially in terms of UX
[10:09:11] <jadew> also, you'd expect that by now, you'd be able to do circuit simulation fairly easy, directly from the schematic, but so far only proteus can do that nicely (however it's very expensive and it sucks in the UX department as well)
[10:12:33] <darknite> i'm trying to use eagle but i spend more time trying to find the right component than anything else
[10:13:42] <jadew> I couldn't get used to it
[10:13:47] <jadew> I gave it a fair try
[10:14:16] <discorpia> it's embarassing to say but the only tool that is simple enough for me to use to actually get something done is fritzing schematic/pcb view
[10:14:59] <jadew> I'm actually watching a video right now on that
[10:15:22] <jadew> it seems very intuitive, but so far I only seen the breadboard thing, I guess it has schematic capture too?
[10:16:05] <discorpia> it has all three views; breadboard/schematic/pcb, but it's really more of a drawing tool than anything
[10:16:47] <jadew> I see
[10:16:52] <darknite> i don't mind schematics in fritzing, i like how it's all svg based as well
[10:17:12] <jadew> I noticed the great graphics
[10:17:15] <jadew> it's great
[10:22:24] <darknite> i was recommended "sPlan" and/or "Sprint Layout" a while ago, but neither of them offer simulation
[10:23:08] <jadew> I'm actually considering building my own package, but that's a long project (maybe two years?) and not sure it's worth it
[10:26:12] <jadew> they all just seem so shitty and overpriced
[10:26:39] <jadew> the only one that I know of and it feels nice to work with is altium, but that costs 10k
[12:54:03] <Tom_itx> jadew, i still use eagle
[12:54:35] <jadew> and are you happy with it?
[12:54:54] <Tom_itx> i don't mind it
[12:55:04] <Tom_itx> i've used it since around ver 2 though :)
[12:55:19] <jadew> so you're probably used to how it works
[12:55:38] <Tom_itx> i tried pads once and found it was just as difficult to use and it's a high end package
[12:55:47] <Tom_itx> mentor graphics
[12:56:19] <Tom_itx> i don't like the new eagle though. they've encorportated too much of their commercial stuff for me
[12:56:33] <Tom_itx> ie buy the parts from us
[12:56:37] <soul-d> or free stuff that works weird with non updated documentation like kicad
[12:56:49] <Tom_itx> if it supported other vendors that may be different
[12:57:36] <Tom_itx> there is no perfect cad package. no matter if it's schematic capture or mechanical drawings
[12:57:59] <jadew> not yet anyway
[13:04:25] <jadew> are you guys aware of any rail splitter IC that can deliver more than 10mA?
[13:04:32] <jadew> I need about 100mA
[13:04:59] <jadew> I've been stuck on this for about 2 months (if not more)
[13:05:05] <jadew> the only option that works fine is this: http://tangentsoft.net/elec/bitmaps/vgrounds/buf-opa.png
[13:05:21] <jadew> but buf634 costs about 6 euro
[13:05:26] <jadew> (a bit more even)
[13:05:39] <jadew> and I can't find any cheapper buffers
[13:12:31] <tzanger> jadew: you can add a push-pull output stage to any op-amp
[13:12:56] <tzanger> basically "buf" in that pic could be a push-pull transistor output stage
[13:13:11] <jadew> tzanger, let me look into that, thank you
[13:13:18] <tzanger> but yes, high-current op-amps are not readily available or cheap
[13:13:23] <jadew> I tried to do something with transistors, but it didn't work out
[13:13:57] <tzanger> you could also try something like am LM386
[13:14:02] <tzanger> that is a little speaker amplifier
[13:14:09] <tzanger> it's not a super awesome chip but it's cheap
[13:15:03] <tzanger> it can also handle your output requirements I think
[13:15:33] <tzanger> you can do 1W with it with a 16V rail
[13:15:36] <jadew> yeah, I think it might just do the job
[13:15:58] <jadew> thanks
[13:16:14] <jadew> I'm gonna look into that push pull thing tho
[13:17:08] <tzanger> there are other amplifier chips you can use which may be better or not, that's just a really common one
[13:17:51] <jadew> I think for this application, only the current output matters
[13:18:05] <jadew> since it doesn't have to oscillate or anything
[13:18:15] <tzanger> does it have to source and sink?
[13:18:23] <jadew> tzanger, yes
[13:18:45] <jadew> the push pull should do it, right?
[13:18:49] <tzanger> yeah either an amplifier IC or a two-transistor output stage should work fine
[13:19:09] <jadew> got it, thanks
[13:19:23] <tzanger> the issue with the transistor stage is biasing; at the halfway point both transistors will want to be on
[13:20:12] <tzanger> it might take some tuning to get right, but it's worth a shot. 2n3904/3906 should handle 100mA and they're cheap enough to not worry about blowing them :-)
[13:22:03] <jadew> http://upload.wikimedia.org/wikipedia/en/thumb/1/1e/Pushpull.PNG/592px-Pushpull.PNG
[13:22:19] <jadew> wouldn't I have a continous short across the rails?
[13:22:54] <jadew> or that's not an accurate representation of how push pull should look like?
[13:24:41] <Casper> jadew: it's accurate
[13:24:53] <Casper> and actually, that's a class B
[13:25:02] <Casper> and suffer from cross over distortion
[13:25:21] <Casper> both pnp and npn is configured as a voltage follower
[13:25:37] <Casper> npn output will be 0.7V lower than the base
[13:25:47] <Casper> and the pnp will be 0.3V lower than it's base
[13:26:02] <Casper> meaning that there is about 1V of dead zone
[13:26:35] <jadew> well, that should be ok for my application, no?
[13:27:05] <Casper> the opamp need to output more than 0.7V for the output of the npn start to output anything, and at less than -0.3V for the pnp to turn on...
[13:27:36] <Casper> since the opamp will compensate, it will be ok for most but high quality
[13:27:55] <jadew> I see
[13:28:10] <jadew> it seems I need to look into "output stages"
[13:28:27] <Casper> time to go clean the snow again bbl
[13:28:30] <jadew> this stuff is mainly used for audio, right?
[13:28:35] <jadew> see ya
[13:29:24] <jadew> well, thank you tzanger and Casper, I have to go help my g/f with something for now
[14:04:28] <jadew> tzanger, thanks a lot, I think it will work great
[14:27:56] <Atmel> hi all, i'm new in atmega128 , have anyone here using tft 2.8" using atmega128?
[14:28:28] <_BJFreeman> Atmel http://arduino.cc/en/Hacking/PinMapping168
[14:31:16] <Atmel> _BJFreeman: so 168 same with 128?
[14:42:31] <_BJFreeman> not exactly the seeeduino LCD use the analog and digital pins, refer to their library
[15:12:04] * amee2woof pounces and licks GuShH's face :3
[15:16:01] <tzanger> hm, I'm looking at the STM32F3 chips... any compelling reason to choose AVR over them? They're VERY inexpensive for what they are
[15:16:36] <tzanger> I *really* like my AT90CAN chips but these are crazy... $8 for 256MB flash, USB, 12 bit A/D and D/A... wow
[15:21:07] <tzanger> the downside is no avr-libc. :-)
[15:28:39] <GuShH> amee2woof: is that a good or a bad thing?
[16:46:33] <_BJFreeman> tzanger maple IDE has arm hardware\tools\arm
[16:47:33] <_BJFreeman> I am more into STM32F417IG http://www.st.com/internet/mcu/product/252133.jsp
[16:48:03] <_BJFreeman> also ST has libraries you can use for the differnt series
[16:53:45] <jadew> tzanger, I guess it all depends on what you have to do, if an AVR is enough and the price is lower, then it's clear
[16:54:28] <jadew> it all comes down to what it needs to do and the price tag
[16:55:48] <tzanger> but that's just it
[16:55:52] <tzanger> AVR is not cheaper, not by a long shot
[16:56:13] <tzanger> STM32F303 is $8; AT90CAN128 is $12 (onesie pricing at digikey)
[16:56:20] <jadew> if it's not cheapper, go for it
[16:56:36] <jadew> price is the most important factor
[16:57:01] <tzanger> I like the straightforward development of avr, haven't done anything yet for stm32, although I'm no stranger to arm in general
[16:57:36] <tzanger> it usually is yes, and for 2/3 the cost I get 2x the memory (not quite a 1:1 map for sure), way more peripherals, faster, etc, etc.
[16:57:56] <jadew> yeah, I like the toolchain as well, but unless it's a one time thing, you always filter stuff first by specs and then by price
[16:57:59] <tzanger> anwyay I'm not a crazy-eyed fanatic of any of the parts, just curious :-)
[16:59:17] <_BJFreeman> some times specs override price
[16:59:27] <jadew> as I said, first by specs
[16:59:52] <jadew> you first figure out what meets the requirements and then you go for the cheappest one :)
[17:00:28] <jadew> and even if it's for hobby projects, I enjoy toying around with different stuff, nothing wrong in gaining experience
[17:00:40] <_BJFreeman> OK and some times there is not cheapest
[17:01:18] <jadew> the cheappest one that meets the requirements lol
[17:01:43] <tzanger> I'm very surprised by the price, I'm kind of waiting for the other shoe to drop, so to speak
[17:01:48] <tzanger> there's always a reason, just not sure what it is yet
[17:01:58] <jadew> maybe newer technology
[17:02:11] <tzanger> the proprietary stlink stuff is kind of a bummer, but it also does have jtag and openocd support
[17:02:16] <_BJFreeman> like the discovery boards are 100X less than most dev systems, yet people complain the chip cost more than the dev system
[17:02:16] <jadew> or already in place manufacturing chain
[17:02:50] <jadew> _BJFreeman, I noticed it's a common marketing practice lately
[17:03:00] <_BJFreeman> and I am glad
[17:03:43] <jadew> I agree tho, the smt32 chips look really great on paper
[17:04:21] <_BJFreeman> how ever this convo should probably be on #arm
[17:05:05] <jadew> why? I'm sure everyone here enjoys chips :)
[17:05:24] <_BJFreeman> ok
[17:05:36] <_BJFreeman> different channels have differnt views
[17:05:37] <tzanger> it was originally comparing it to avr (at90can specifically)
[17:05:56] <tzanger> I use at90can in a few projects and really like it but they're expensive for what they are
[17:07:00] <jadew> what's the deal with the CAN series?
[17:07:37] <jadew> are they labled CAN simply because they have peripherals for the CAN protocol?
[17:07:57] <jadew> no other AVRs have that?
[17:09:34] <jadew> ah.. tzanger, since you're working with CAN, any chance you have some logic analyzer samples saved?
[17:10:54] <_BJFreeman> I see the at90can chip for ~$4
[17:11:28] <jadew> the cheappest I found is 6.5
[17:11:58] <_BJFreeman> Ok that was reel price
[17:12:10] <jadew> ah
[17:12:56] <jadew> is it possible that this CAN series are also more rugged than the other series?
[17:13:03] <jadew> automotive stuff usually is
[17:13:07] <_BJFreeman> then you had the 11bit anbd 19bit(can 2.0)
[17:14:10] <_BJFreeman> more it was adopted back in the 80's so is defactor for Automotive
[17:15:46] <tzanger> yes, they have CAN hardware, that's it
[17:15:52] <tzanger> I am not working with CAN, but I have
[17:16:00] <tzanger> bluwhale: where?
[17:16:02] <tzanger> ah reels
[17:16:10] <tzanger> _BJFreeman: I mean, not bluwhale
[17:16:23] <tzanger> I love compilers
[17:16:23] <tzanger> 8538: e3a05002 mov r5, #2
[17:16:24] <tzanger> 853c: e1a00005 mov r0, r5
[17:16:26] <jadew> they don't seem more rugged, I just checked the datasheets
[17:16:30] <tzanger> what's wrong with mov r0, #2?
[17:16:35] <_BJFreeman> digikey
[17:16:55] <jadew> tzanger, you probably can't move something into r0, that's not comming from a register
[17:17:36] <tzanger> I'm pretty sure you can, it's been a while since I've done ARM assembly by hand but I seem to remember the registers being completely orthogonal
[17:17:57] <jadew> I don't see why else it would chose to do that
[17:19:08] <_BJFreeman> only do C except when inline for speed
[17:19:58] <iSalek> Can someone please help me with ds18b20 function? I have pasted my function on http://pastebin.com/eej0ybWc
[17:20:21] <bluwhale> tzanger: Did someone call for a blue whale?
[17:20:26] <bluwhale> :D
[17:20:38] <jadew> iSalek, it looks just like yesterday, did you manage to output what you got from the sensor?
[17:21:02] <iSalek> When I enable that if(error !=0) part i always get 1 on sseg display
[17:21:13] <iSalek> so I guess function returns no presence detected
[17:21:36] <iSalek> Short circuit = 2; No presence = 1; Otherwise = 0
[17:21:58] <jadew> so error is set by the reset function?
[17:22:14] <iSalek> Yes
[17:22:28] <jadew> what's your pullup?
[17:22:42] <iSalek> 4K7
[17:22:49] <jadew> and the sensor is powered?
[17:22:59] <iSalek> Yes
[17:23:10] <iSalek> It's on board so it's powered from the same board
[17:23:18] <jadew> are you sure you didn't mess up the pin order?
[17:23:30] <jadew> ah, you bought it like that?
[17:24:05] <iSalek> For VCC and GND I'm pretty sure because if you turn it other way around it will get really hot :)
[17:24:11] <iSalek> No, I made the board :\
[17:24:32] <jadew> iSalek, the signal is the middle pin
[17:25:01] <jadew> you don't have an oscilloscope, do you?
[17:25:04] <iSalek> No
[17:25:15] <jadew> do you have another sensor?
[17:25:17] <iSalek> I just measured vcc and gnd pins, I get 5V
[17:25:29] <jadew> do you get 5V on reset too?
[17:25:34] <iSalek> Just a second
[17:25:48] <jadew> on *signal
[17:25:57] <iSalek> 4.49
[17:26:14] <jadew> weird, but I guess it's ok
[17:26:29] <iSalek> I will try with another DS now
[17:26:31] <iSalek> just a second
[17:31:36] <iSalek> When I add new DS my board shuts off... like I short circuit it :\
[17:32:21] <jadew> iSalek, http://www.rapidonline.com/catalogueimages/module/M060335P01WL.jpg
[17:32:23] <iSalek> One works just fine and another one shuts board off :\
[17:32:24] <jadew> from left to right
[17:32:28] <jadew> tell me how it's connected
[17:32:40] <iSalek> VCC - Signal - GND
[17:32:42] <jadew> well, you said it didn't works just fine
[17:32:50] <jadew> iSalek, wrong
[17:32:58] <iSalek> reverse
[17:33:01] <jadew> yep
[17:33:10] <iSalek> my bad, looking at the board upside down :) My bad :)
[17:33:14] <Grievar> Are I2C addresses 1 and 2 somehow special?
[17:33:43] <jadew> Grievar, if I remember correctly, you can't use them
[17:38:48] <jadew> Grievar, http://www.nxp.com/documents/user_manual/UM10204.pdf chapter 3.1.12
[17:38:57] <jadew> Reserved addresses
[17:39:46] <jadew> 0, 1, 2, 3, 4-7, they're reserved
[17:41:11] <jadew> iSalek, so was it in reverse or it was ok but the board shut down?
[17:42:08] <jadew> iSalek, btw, you should try a different 1-wire library too
[17:42:26] <iSalek> Any suggestions? :)
[17:42:57] <jadew> don't know, where did you get this one from?
[17:45:54] <iSalek> Don't really know, in .h file says that author is Stefan Sicklinger
[17:46:20] <iSalek> I can paste the code to you if you want to take a look at it?
[17:46:26] <jadew> you could really use a scope or a logic analyzer
[17:46:42] <jadew> sure, I'd like to see the reset function
[17:46:49] <iSalek> I don't have eather :\
[17:48:10] <jadew> what do you mean?
[17:48:13] <jadew> ds1820_reset this function
[17:48:27] <iSalek> I don't have logic analyzer or scope
[17:48:30] <iSalek> here is the .c file http://pastebin.com/a2e4LhEN
[17:48:37] <jadew> ah
[17:48:39] <iSalek> and .h file http://pastebin.com/bkqRF6pF
[17:50:43] <jadew> btw
[17:50:49] <jadew> is your FCPU defined properly?
[17:52:29] <iSalek> I think it is
[17:52:40] <jadew> the timing looks ok, that library enables the pullup on that pin when it's not using it
[17:52:56] <jadew> which is not necesary
[17:53:10] <iSalek> What should FCPU look like for 8MHZ crystal?
[17:53:19] <jadew> 8000000
[17:53:43] <iSalek> without UL at the end?
[17:54:03] <jadew> don't think it matters, but you can add it to be safe
[17:54:46] <jadew> and make sure the mcu is running at that speed
[17:54:51] <tzanger> add the UL, it won't hurt. I never know when numbers need to have the L/UL specified and when they don't
[17:55:22] <jadew> in the main loop, light up a led and turn it off at 1 second intervals and see if it looks ok
[17:56:12] <iSalek> It looks ok because i'm making a clock from 4 seven segment displays and I want to display temperature too
[17:56:14] <jadew> tzanger, when you don't want a number to be interpreted by the compiler as an integer for example and you want it to be unsigned long
[17:56:20] <iSalek> I have seconds indicator and it works fine
[17:59:02] <iSalek> I keep getting 5 on low display and high is turned off
[17:59:19] <iSalek> in hex it should be High = 0x00 and Low = 0x76
[17:59:21] <jadew> what?
[17:59:50] <jadew> are you sure the display is working properly?
[18:00:23] <iSalek> I'm not sure about one LED at Hour Low position, It may be 5 or 6 since once diode isn't working
[18:00:27] <iSalek> I have to replace it :)
[18:00:40] <iSalek> But still, it should give some temperature reading :\
[18:10:39] <jadew> what are you building anyway?
[18:14:28] <iSalek> A simple clock :)
[18:14:29] <jadew> iSalek, what are you building?
[18:14:32] <jadew> ah
[18:14:44] <jadew> and you want it to show temperature too?
[18:14:47] <iSalek> It has 4 x 7 segment displays made from discrete smd leds
[18:14:50] <iSalek> Yes
[18:15:29] <iSalek> I'm not sure what I'm doing wrong. I'm sure that display is working fine because time display works fine, second ticks are ok
[18:15:39] <iSalek> only problem is with the temperature :\
[18:21:04] <iSalek> And things to be worse, I'm making it for my girlfriend as a new year pressent :)
[18:21:45] <Tom_itx> you'd better hurry up
[18:21:54] <jadew> that's a nice present
[18:22:15] <jadew> stick around for a bit more, I'm writting an example and then I'm gonna share some code
[18:23:11] <iSalek> I know, It's mostly finished since all other features work just fine
[18:23:25] <iSalek> only problem is with a ds temp measurement
[18:23:26] <iSalek> :)
[18:23:36] <Tom_itx> i2c?
[18:23:40] <iSalek> yes
[18:23:45] <iSalek> DS18B20
[18:24:15] <Tom_itx> i got a dallas rtc i wonder if it's similar
[18:25:11] <iSalek> I'm not sure :)
[18:25:31] <Tom_itx> do you have the code written?
[18:25:50] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/Dallas%20RTC%20Code/
[18:25:55] <Tom_itx> there's twi stuff that works
[18:27:06] <jadew> Tom_itx, it's 1 wire
[18:27:11] <jadew> not i2c
[18:27:13] <iSalek> http://pastebin.com/a2e4LhEN .c file
[18:27:19] <Tom_itx> ok
[18:27:26] <iSalek> http://pastebin.com/bkqRF6pF .h file
[18:28:00] <Tom_itx> i haven't done 1 wire yet
[18:28:38] <iSalek> Well jadew took a look at this library and he told me it should be ok
[18:28:45] <iSalek> However I keep getting error code 1
[18:28:53] <Tom_itx> http://teslabs.com/openplayer/docs/docs/other/ds18b20_pre1.pdf
[18:29:00] <iSalek> which is no presence
[18:29:19] <Tom_itx> take a peek ^^
[18:30:52] <iSalek> Ok, I'm looking at it now :)
[18:31:19] <Tom_itx> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=90515
[18:31:22] <Tom_itx> or on avrfreaks
[18:32:21] <Tom_itx> http://www.siwawi.arubi.uni-kl.de/avr_projects/tempsensor/index.html
[18:33:00] <Tom_itx> there's some code
[18:35:28] <iSalek> Well this 2nd library is way too big for tiny2313
[18:40:31] <jadew> you can remove the search function
[18:44:13] <jadew> iSalek, did it compile?
[18:45:12] <iSalek> I'm editing the new code from the 1st link
[18:45:24] <iSalek> I'll try to compile it in few minutes when I'm done editing :)
[18:45:32] <iSalek> Not use if it will work thou :)
[18:46:04] <jadew> keep us posted :)
[18:49:53] <iSalek> I will :)
[19:00:55] <iSalek> Still the same thing, even with the new library
[19:01:02] <iSalek> It says 05 :\
[19:01:20] <iSalek> I've just edited the part where I display the value on the display
[19:01:29] <iSalek> plus combining hihg+low and shifting it :\
[19:02:16] <iSalek> The value to display 5 on display is 0x76
[19:03:14] <sabesto> anyone seen anyone interface a PS3 controller with an AVR using BT?
[19:03:23] <jadew> iSalek, that's after shifting?
[19:03:54] <jadew> iSalek, also, the value is irrelevant as long as you don't get a presence pulse
[19:05:00] <iSalek> yes, now I've tried to edit that digit from the 1st library
[19:05:23] <iSalek> I'll check with my lighter if values change ond the display
[19:06:28] <jadew> do you have a schematic for your thingie?
[19:07:52] <iSalek> http://sasakaranovic.com/Schematic.pdf
[19:09:19] <jadew> do you keep the programmer connected?
[19:09:26] <iSalek> Yes
[19:09:31] <jadew> try disconnecting it
[19:10:29] <iSalek> Nothing changes :\
[19:10:58] <jadew> reboot the device with the programmer disconnected
[19:11:17] <iSalek> Also every time when I programm I have to remove DS because it blocks SCK while programming :)
[19:11:26] <jadew> just in case that the sensor gets stuck (altho improbable) durring programming, since it's on the SCK line
[19:11:42] <jadew> ah, I see
[19:13:09] <jadew> it should work
[19:17:40] <jadew> give that library a try as well, I removed the stuff you don't need and it's configured for PB7
[19:17:58] <jadew> should compile fine with avr-g++ or avr-gcc with -std=c99
[19:18:14] <iSalek> Ok, I'm adding it now :)
[19:19:27] <iSalek> one_wire_init I use it just once before while?
[19:19:33] <jadew> yeah
[19:20:05] <jadew> http://dumb.ro/files/avr/main.txt
[19:25:14] <iSalek> Now the high and low are blank :\
[19:25:26] <jadew> can you paste your code?
[19:26:20] <iSalek> http://pastebin.com/zXEs4Med
[19:27:19] <jadew> ok, first of all
[19:27:26] <jadew> you have return 0; in the while()
[19:27:43] <jadew> so after the first loop it reboots
[19:28:34] <iSalek> I didn't see that :) I've moved return down from the while and added _delay_ms(2000) for every while
[19:28:36] <jadew> so if the lcd stays untouched, it means you're not getting a presence pulse
[19:28:47] <jadew> that's what the if (one_wire_reset()) thing checks
[19:28:58] <jadew> one_wire_reset() returns 1 when there's a presence pulse
[19:29:29] <jadew> you should signal when there's no pulse
[19:29:33] <jadew> (on the LCD)
[19:29:36] <jadew> so you can tell
[19:30:28] <jadew> but, if the device is powered properly, the pullup is there and everything is connected right, it should work
[19:30:59] <jadew> ah, you can hook up a headset between the 1-wire bus and gnd
[19:31:18] <jadew> you should be able to hear the traffic
[19:33:16] <iSalek> I've edited the code and now I get 1 1 on High an Low display which is no presence :\
[19:34:40] <jadew> PORTB = bufferValue;
[19:35:55] <jadew> PORTB = bufferValue & 0x7F;
[19:36:15] <iSalek> What is 7F for ?
[19:36:31] <jadew> to take out PB7
[19:36:34] <jadew> to leave it 0
[19:37:52] <iSalek> When I remove DS display goes blank, when I add it it goes 11 (no presence :\)
[19:38:30] <jadew> that's weird
[19:38:33] <jadew> make that modification
[19:38:38] <jadew> and try it with the DS out
[19:40:22] <iSalek> I've changed the code already, that's what happens then I add/remove Ds
[19:40:58] <jadew> can you paste your current code please?
[19:41:25] <iSalek> http://pastebin.com/jp0zEwiB
[19:41:47] <jadew> #define F_CPU 1000000UL // 10 MHz you said it's 8Mhz
[19:42:47] <jadew> ok, whatever happens, the last two setbuffervalue thingies will get triggered
[19:43:05] <jadew> you need to add else { setbuffer }
[19:43:16] <jadew> do it on the first if
[19:43:25] <jadew> you don't have to do it for the second one too
[19:44:45] <jadew> http://pastebin.com/xFx7s42A
[19:46:08] <jadew> also, before nothing should have happened with the display when you removed the DS
[19:46:34] <jadew> since the code was buggy, it was always setting the display to SSEG[1]
[19:47:30] <iSalek> Here is the new code
[19:47:31] <iSalek> http://pastebin.com/D1ZYhkDE
[19:48:15] <jadew> and what happens now when the DS is not there?
[19:49:22] <iSalek> If the pullup is there it stays 1 and if I remove the pullup it goes blank
[19:49:56] <jadew> well, it shouldn't go blank either way
[19:50:47] <jadew> pullup in, DS out should be 1
[19:50:58] <jadew> pullup in, DS in, it should be something else
[19:53:07] <iSalek> first one is true
[19:53:48] <iSalek> 2nd one is not :(
[19:54:06] <jadew> so with the ds in or out, it's still 1?
[19:54:15] <iSalek> yes
[19:54:27] <jadew> ok... well, we know the line is ok
[19:54:39] <iSalek> I will buy new DS tomorrow and try with it
[19:54:43] <jadew> since removing the pullup has an effect on it
[19:54:54] <jadew> it will appear as if there was a presence pulse
[19:55:06] <jadew> now...
[19:55:12] <jadew> how are you compiling?
[19:55:14] <jadew> makefile?
[19:55:32] <iSalek> Don't know, I just click build in atmel studio :)
[19:55:34] <_BJFreeman> just to validate which pin is PB7 on the Uc
[19:56:04] <jadew> hmm, iSalek, ok...
[19:56:12] <jadew> and what crystal are you using?
[19:56:17] <jadew> _BJFreeman, what do you mean?
[19:56:20] <OndraSter_> meth crystal
[19:56:22] <iSalek> 8MHZ
[19:56:24] <OndraSter_> crystal meth*
[19:56:40] <jadew> iSalek, well, in your file it's configued for 10Mhz
[19:56:52] <iSalek> I've edited that line
[19:56:55] <jadew> is it configured properly in Atmel Studio?
[19:57:10] <jadew> (timing is very important for 1-wire)
[19:57:17] <_BJFreeman> PB7 is port b bit 7 which is a pin on the UC just making sure your connected to the right pin
[19:57:23] <iSalek> Where can I check that?
[19:57:37] <jadew> iSalek, I have no idea, I never used atmel studio
[19:57:51] <jadew> probably in the project settings
[19:58:14] <jadew> looks like I have it installed, let me check
[19:58:20] <_BJFreeman> which UC are you using
[19:58:25] <jadew> t2313
[20:00:28] <iSalek> I don't know if there is an option to set crystal speed in atmel studio
[20:00:38] <iSalek> I've just definec F_CPU and I think that's it
[20:02:11] <jadew> do you get a warning when compiling your code?
[20:02:45] <jadew> 800 000
[20:02:51] <jadew> is not 8 000 000
[20:03:08] <jadew> #define F_CPU 800000UL // 8 MHz
[20:03:17] <jadew> count the zeros
[20:04:02] <jadew> and put this at the top of 1wire.c: #define F_CPU 800000UL // 8 MHz
[20:04:10] <jadew> #define F_CPU 8000000UL // 8 MHz
[20:04:14] <jadew> the second one
[20:04:23] <jadew> just to make sure delay.h will use the proper F_CPU
[20:05:01] <jadew> remove #ifndef too, from the main file
[20:05:27] <jadew> if you didn't find a setting for it in atmel studio, then don't take any chances
[20:07:40] <iSalek> I've made the changes you told me and still I get 11 :(
[20:08:08] <jadew> do you think you burned the sensors?
[20:09:43] <iSalek> I don't know what else could be... since we've tried every combination :\
[20:09:50] <iSalek> I only have 2 DS but maybe they both are dead
[20:10:04] <jadew> you could really use a scope
[20:10:15] <iSalek> I know but I don't have one :(
[20:10:32] <_BJFreeman> are you using this a a bare chip or on a dev board
[20:10:48] <jadew> he made his own board
[20:11:10] <_BJFreeman> did you use the DIP or flatpack
[20:11:52] <_BJFreeman> flatpack = smd
[20:12:29] <iSalek> You mean DS? It has only 3 pins, like a transistor
[20:13:21] <OndraSter_> (coming to the middle of the discussion) does the device appear when searching for IDs on the bus?
[20:13:27] <OndraSter_> or do you use only single device mode?
[20:13:40] <_BJFreeman> the tiny PB7 is pin 19 for the DIP and pin 17 for the smd
[20:13:59] <jadew> OndraSter_, it doesn't even responds to the reset pulse
[20:14:10] <jadew> and he's using a single device
[20:14:34] <OndraSter_> oh
[20:14:34] <OndraSter_> ok
[20:14:46] <OndraSter_> I have got here five or so DS18B20s lying around
[20:14:47] <OndraSter_> somewhere
[20:14:56] <OndraSter_> in Dallas' pack
[20:15:01] <OndraSter_> as a sample
[20:15:19] <jadew> I have some on the way
[20:15:31] <jadew> some around here and one outside, on the balcony
[20:15:36] <jadew> taking readings constantly
[20:15:44] <jadew> I'm logging the winter :P
[20:16:06] <OndraSter_> I am not logging the winter
[20:16:12] <OndraSter_> it was 8C yesterday :)
[20:16:15] <OndraSter_> and 10C the day before :D
[20:16:29] <jadew> yeah, it was quite warm the past few days
[20:16:30] <_BJFreeman> my focus is that the pin in the code was changed so want to verify the correct pin is hooked up to the DS
[20:16:37] <jadew> 3 celsius outside my balcony right now
[20:17:05] <jadew> _BJFreeman, we know it's the correct pin, because removing the pullup will yield different results
[20:17:17] <OndraSter_> _BJFreeman, looking at your nickname... do you have a relative called Morgan?
[20:17:40] <_BJFreeman> could be we have a very large family
[20:17:42] <jadew> yeah
[20:17:46] <OndraSter_> or Gordon?
[20:17:48] <jadew> Hand Job is his name
[20:17:52] <OndraSter_> lol
[20:18:48] <iSalek> DS is connected to the 19th pin of t2313 and datasheet says it's PB7
[20:19:16] <jadew> if it's on the internet, it must be true!
[20:19:28] <iSalek> lol :)
[20:19:55] <jadew> http://pastebin.com/ubvcZhke
[20:19:56] <iSalek> If the DS is not blown then I don't know what's wrong :\
[20:19:58] <_BJFreeman> yes I enjoy the double entendre
[20:20:00] <jadew> now it's official
[20:20:39] <jadew> iSalek, yeah, I think we covered pretty much everything we could cover with out a scope
[20:21:15] <jadew> iSalek, here's an idea
[20:21:31] <jadew> desolder everything from the board and give it to her like that
[20:21:39] <jadew> say it's DIY and let her deal with it
[20:21:45] <OndraSter_> iSalek, didn't you have some issues with flashing your chip recently?
[20:21:50] <OndraSter_> since there was DS on the board
[20:21:54] <OndraSter_> interfering on some of the line(s)
[20:22:19] <jadew> OndraSter_, yeah, it was screwing up with SCK
[20:22:38] <OndraSter_> I mean, did he disconnect the programemr this time? :D
[20:22:40] <iSalek> Yea, DS was connected on SCK so I couldn't flash it
[20:22:41] <OndraSter_> programmer*
[20:22:59] <iSalek> Now I have to remove DS every time I want to programm
[20:24:15] <jadew> iSalek, you don't have another chip?
[20:24:24] <jadew> you could try to make it work on a different MCU
[20:24:31] <jadew> spit out debug data over serial
[20:24:39] <OndraSter_> are you connecting the DS back after each flash?
[20:24:42] <OndraSter_> the correct way around? :D
[20:25:02] <jadew> we went over that too :P
[20:25:14] <OndraSter_> oh ok
[20:25:25] <iSalek> I'm waiting for some parts to get to me after the new year to make my small development board
[20:25:59] <iSalek> For now I have another board with serial communication which I could use to debug this code
[20:26:19] <iSalek> I will try it in the morning since it's 3:13AM here in Serbia :)
[20:26:31] <jadew> ah, we're neighbours
[20:26:43] <iSalek> Thank you all for the help, I really appreciate it :)
[20:26:51] <iSalek> Where are you from? :)
[20:26:56] <jadew> romania
[20:27:14] <iSalek> Ah, nice :)
[20:27:15] <jadew> hope you get it working
[20:27:15] <OndraSter_> doesn't romania have the best driving road on the world?
[20:27:19] <OndraSter_> judged by the Top Gear
[20:27:28] <jadew> lol
[20:27:30] <iSalek> Thank you, I hope to :)
[20:27:31] <jadew> that's such bullshit
[20:27:50] <jadew> our roads suck
[20:27:57] <OndraSter_> it was up the hills
[20:28:02] <OndraSter_> somewhere near bucuresti?
[20:28:05] <OndraSter_> or w/e is the main city
[20:28:10] <OndraSter_> (I suck at geography a lot)
[20:28:26] <jadew> not that near, but yeah
[20:28:53] <OndraSter_> "6 tons of dynamite and 40 people died during the build of this road"
[20:28:55] <OndraSter_> I remember
[20:29:02] <jadew> that's a cool road tho
[20:31:42] <jadew> http://www.flickr.com/photos/28144571@N06/3592366686/in/set-72157619106770415/
[20:31:48] <jadew> http://www.flickr.com/photos/28144571@N06/3591560991/in/set-72157619106770415/
[20:31:51] <jadew> this one, right?
[20:32:19] <OndraSter_> http://clip2net.com/s/2EIoc
[20:32:21] <OndraSter_> hard t osay :P
[20:32:23] <OndraSter_> to say
[20:32:36] <Tom_itx> whi do i gotta sign in to see those?
[20:32:52] <jadew> you have to sign in?
[20:33:13] <OndraSter_> yes
[20:33:19] <Tom_itx> Don't have a Yahoo! ID?
[20:33:19] <Tom_itx> Create New Account
[20:33:19] <Tom_itx> OR
[20:33:19] <Tom_itx> Sign in with:
[20:33:19] <Tom_itx> Facebook
[20:33:19] <Tom_itx> Google
[20:33:24] <jadew> but after you sign in they work?
[20:33:30] <jadew> hmm
[20:33:32] <OndraSter_> we do not have accounts
[20:33:32] <Tom_itx> i'm not gonna sign in
[20:33:34] <jadew> maybe I made them private
[20:33:38] <Tom_itx> speak for yourself
[20:33:41] <OndraSter_> oh
[20:33:43] <OndraSter_> ok
[20:33:47] <OndraSter_> we do not want to sign it
[20:33:48] <OndraSter_> in
[20:34:04] <jadew> try now
[20:34:29] <OndraSter_> yes, that is the road
[20:34:55] <OndraSter_> Jeremy had DBS Volante (the car I want); Richard had some Ferrari and James had some Lambo
[20:35:23] <jadew> nice, I didn't see the whole show, but I wouldn't drive too fast on that road
[20:40:05] <jadew> OndraSter_, you have some software that takes screenshots and uploads them directly?
[20:41:46] <OndraSter_> clip2net obviously
[20:42:12] <jadew> ah hehe
[20:42:15] <jadew> now it makes sense
[20:42:22] <OndraSter_> it is free if you are fine with 100MB of storage
[20:42:34] <OndraSter_> and they have lately added limit to the age of the files - I think that few months or so
[20:43:48] <OndraSter_> .. that moment when you click on "restart" and before you can realize on what you have clicked and what is going to happen the PC has already rebooted and wants you to login..
[20:43:50] <OndraSter_> awesome feeling
[20:43:57] <OndraSter_> ( <-- new SSD owner)
[20:44:21] <jadew> haha
[20:44:32] <jadew> doubt it happens that fast
[20:44:42] <OndraSter_> actually
[20:44:49] <OndraSter_> once the apps close the OS shuts down in 3s
[20:45:15] <OndraSter_> and in 10s it goes from the MSI logo (which takes 10s on its own omg) to the "press ctrl-alt-del"
[20:45:16] <jadew> I never shut down my pc
[20:45:19] <OndraSter_> neither do I
[20:45:25] <OndraSter_> but I accidentally clicked on reboot today
[20:46:18] <OndraSter_> I should time it someday
[20:46:24] <jadew> when I have to reboot I go and take a shower, shave go watch TV and when I hear the "ding bling bing" sound I come back
[20:47:36] <jadew> I'm kidding but not really
[20:47:41] <jadew> it does take a lot
[20:47:50] <OndraSter_> I can do that when I am rebooting my server (this PC on which the IRC runs)
[20:48:08] <OndraSter_> I am tempted to upgrade
[20:48:20] <OndraSter_> since I need temporary 1155 motherboard anyway
[20:48:35] <OndraSter_> so why not whip out $150 or so for upgrade
[20:48:53] <jadew> I'm using an eeepc as a server
[20:49:03] <OndraSter_> (Intel G550, SandyBridge dualcore 2.6GHz or so; 2x8GB RAM for my PC => I would put 2x4GB into the server; some cheapish motherboard)
[20:50:34] <OndraSter_> this poor server is providing DNS, DHCP, torrent, file, WSUS, domain, soon to be added also exchange
[20:50:49] <OndraSter_> and TFS
[20:51:01] <jadew> I'm sure it can handle it all
[20:51:12] <OndraSter_> 2GB RAM can not
[20:51:16] <jadew> DNS and DHCP is not even worth mentioning :P
[20:51:19] <OndraSter_> I am using 2.7GB right now, already swapping
[20:51:35] <jadew> it's the porn
[20:52:02] <jadew> it eats memory
[20:52:03] <_BJFreeman> TFS = toyota finacial services
[20:52:12] <OndraSter_> lol
[20:52:15] <OndraSter_> no
[20:52:19] <OndraSter_> Team Foundation Server
[20:52:31] <OndraSter_> something like cvs/git/svn but for VS
[20:52:39] <jadew> wait, your server is running windows?
[20:52:41] <OndraSter_> (if you do not want to use svn)
[20:52:42] <OndraSter_> of course
[20:52:43] <OndraSter_> 2008 R2
[20:52:53] <jadew> I see
[20:52:53] <OndraSter_> with new upgrade I would change it for 2012
[20:52:59] <jadew> then you probably need a bit more than 2gb
[20:53:08] <OndraSter_> lol
[20:53:24] <OndraSter_> Win8 can work with 512MB RAM without any swap and still launch some applications btw :P
[20:53:41] <OndraSter_> Cotulla ported it to old HTC HD2 and booted it... succesfuly
[20:54:00] <jadew> nice
[20:54:38] <OndraSter_> that is phone from 2009 running: originally WM6.5; ported WP7, WP8 and W8 in works; Android; Maemo, MeeGo; Ubuntu
[20:54:44] <jadew> I guess it depends on what you keep running
[20:54:48] <OndraSter_> 1GHz singlecore, half gig of RAM
[20:55:11] <OndraSter_> holycrap it is late
[20:55:13] <OndraSter_> gn
[20:55:16] <jadew> night