#avr | Logs for 2014-02-02

Back
[02:45:11] <MrMobius> Im trying to write firmware to this atmel AT89LP chip. I dont have an AVR programmer so I wrote the firmware using SPI on a serial cable. I can connect and write the hex file then read the hex file back and it matches but the chip doesnt do anything.
[02:45:28] <MrMobius> I know its not an AVR but the bootloader should be about the same. Can anyone help?
[02:46:38] <MrMobius> For AVRs, do you have to do anything to get it to run other than settings fuses and putting the right hex data at the right address?
[02:52:04] <bitd> Thats certainly an interesting question MrMobius.
[02:53:07] <bitd> Why did you pick the AT89LP?
[02:54:26] <MrMobius> i was curious when i saw that it was single-cycle
[02:54:40] <MrMobius> i thought it might outperform the msp430 i was using for raw calculations
[02:54:46] <MrMobius> assuming small data types
[02:57:18] <bitd> I see. I assume you read this topic: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1016625
[03:01:09] <bitd> So you have the code set up to blink a led or something straight from the start?
[03:01:15] <MrMobius> ya
[03:02:40] <MrMobius> just a sec
[03:04:58] * bitd is in suspense
[03:04:59] <bitd> <.<
[03:06:14] <MrMobius> sorry, was on the phone
[03:06:23] <bitd> Haha oke.
[03:08:30] <MrMobius> bitd, ive seen that post before. i can write firmware and read it back to check but i cant get the chip to run. here is my program: http://pastebin.com/VCgww2Ai
[03:10:57] <MrMobius> i thought maybe i was not writing the values correctly. programming is just a simple matter of putting the data at the right address, isnt it?
[03:11:22] <bitd> Well, yeah, but what would have been going wrong?
[03:11:49] <MrMobius> i dunno. i never wrote a hex programmer before. is there something special i have to do i am missing?
[03:12:16] <bitd> Well, I am reading up on it as we speak.
[03:12:25] <bitd> As far as I can tell, nothing you are missing.
[03:12:50] <MrMobius> i thought maybe it was fuses but i set those to defaults which should work according to the datasheet
[03:20:38] <bitd> I got nothing MrMobius, sorry.
[03:20:56] <MrMobius> np, thanks for looking
[04:55:24] <mesger> I'm having a problem with PSTR, I can get rid of the uninitialized variable warning, but i get another one instead , my macro is as follows :
[04:55:32] <mesger> #define PROG_MEM __attribute__((section(".progmem.mydata")))
[04:55:32] <mesger> #define PSTR2(s) (__extension__({const static char __c[] PROG_MEM = (s); &__c[0];}))
[04:55:41] <mesger> this gives me statement has no effect
[04:56:03] <The_Coolest> wtf are you trying to do?
[04:56:20] <mesger> getting rid of warnings
[04:57:10] <mesger> standard progmem gives only initialized variables can be put into program memory area
[04:57:27] <mesger> so hence this macro which worked fine in the arduino ide
[04:57:53] <mesger> but i migrated to eclipse and get now Satement has no effect with the above mmacro
[04:58:29] <mesger> must be something i typed :)
[04:58:42] <The_Coolest> I don't understand that statement, why is it in __extension__, what is &__c[0]; for?
[04:59:35] <The_Coolest> also why are you defining what PROG_MEM is? Why don't you just include to appropriate header?
[05:00:28] <mesger> http://forum.arduino.cc/index.php/topic,85840.0.html
[05:03:30] <mesger> i only see what i read
[05:03:44] <mesger> and dont understand that macro pretty much
[05:04:05] <mesger> but if you are trying to point that out now you have confirmation
[05:18:19] <The_Coolest> mesger include pgmspace.h
[05:19:11] <The_Coolest> then just define your progmem as you would any other global/static const variable only add PROGMEM
[05:19:35] <The_Coolest> like in reply #1
[05:33:30] <mesger> still statement has no effect on PSTR("test")
[05:35:24] <The_Coolest> Don't use that
[05:37:15] <mesger> how am i gonna put const char* in flash ?>
[05:38:50] <The_Coolest> const uint8_t PROGMEM tone_pin_to_timer_PGM[] = { 2 /*, 3, 4, 5, 1, 0 */ };
[05:39:02] <The_Coolest> so you use char* instead of uint8_t
[07:59:57] <Roter> I have a question, if i have a led, that needs 70ohm resistor, what would happen if i used a 62ohm resistor?
[08:00:13] <Roter> it would probably burn out faster right?
[08:00:46] <antto> you'll let moar current thru it then
[08:02:14] <Roter> well yeah, but would it just go a little brighter, or would it blow?
[08:02:36] <antto> there are two ways to find out
[08:02:37] <Roter> also, how much would it reduce the lifetime?
[08:03:22] <johnwalkr> don’t you have any more resistors?
[08:03:28] <johnwalkr> better to go 100 ohm
[08:03:39] <johnwalkr> or 124 (2x 62 in series
[08:04:07] <Roter> i was just interested
[08:04:17] <Roter> how bad would it be, so thats why i asked
[08:04:31] <Roter> i will just get 82 ohm then
[08:05:01] <antto> the resistor value should be chosen also depending on the voltage you're gonna be using
[08:05:01] <johnwalkr> yeah better idea
[08:05:41] <antto> and the actual LEDs (they should have some kind of specification where it says what the typpical current should be)
[08:06:02] <Lambda_Aurigae> math!
[08:06:10] <antto> you don't wanna let more current than that thru them
[08:06:11] <antto> ;P~
[08:07:01] <antto> i have diffused RED leds in this device here, they run on 5V and thru 10K resistors ;P~
[08:07:09] <Roter> i was looking at this one http://www.lemona.lt/index.php?page=item&i_id=52132
[08:07:35] <Lambda_Aurigae> I buy 330 ohm resistors in bulk for red and green LEDs here.
[08:07:36] <antto> so, do the maths till you get 20mA
[08:08:08] <antto> you can go lower than 20mA but don't go much higher than it
[08:08:25] <antto> or they'll emmit black light ;P~
[08:08:43] <Roter> well i did this math: (5v(programmer)-3.6V(LED)) / 0.02A(LED)
[08:08:52] <Roter> and i get 70 ohms
[08:08:57] <Lambda_Aurigae> antto, and/or magic blue smoke.
[08:09:39] <Roter> am i right?
[08:10:47] <antto> no idea, i never said i'm good at maths
[08:10:59] <antto> and circuits
[08:11:10] <Roter> its more phisics, but i believe i am right
[08:11:12] <antto> but you will be safe with bigger resistance
[08:11:33] <Roter> and the worst scenario i will have to buy some more
[08:11:37] <antto> so if maths say 70 ohms - you can safely put 100 and it'd be similar
[08:11:42] <Lambda_Aurigae> I don't know why you are subtracting that 3.6V though
[08:11:57] <antto> Lambda_Aurigae yeah, that's strange to me too
[08:12:15] <Lambda_Aurigae> if you are feeding 5V to the LED and you want 0.02A then you divide 5 by 0.02 and get 220
[08:12:23] <johnwalkr> unless yu’re building a flashlight you don’t need to aim for max power
[08:12:37] <antto> yeah
[08:12:39] <Lambda_Aurigae> then I would just go with a standard 330ohm resistor in that case.
[08:12:44] <johnwalkr> leds are plenty bright way below max rating
[08:12:49] <antto> those LEDs can f*cking blind you
[08:12:57] <antto> hence why i put 10K on mine
[08:13:06] <Roter> well
[08:13:48] <Lambda_Aurigae> I've never subtracted anything from my supply voltage when figuring current on LEDs
[08:14:10] <Roter> https://www.youtube.com/watch?v=zRotGzBhx08&list=PLE72E4CFE73BD1DE1
[08:14:12] <Roter> 8:22
[08:14:29] <Roter> i just thought i would need to do it like him?
[08:15:17] <Roter> i was trying to do the same thing he was
[08:15:35] <Lambda_Aurigae> put something around 300 to 400 ohms on it and you will be fine.
[08:15:54] <Lambda_Aurigae> unless you are trying to get maximum output from the LED or to get maximum energy savings.
[08:17:21] <Roter> but if i want the make the leds very bright, i can just use the resistance of what i calculated right?
[08:17:41] <Lambda_Aurigae> I think yours is waaay too low.
[08:17:56] <Lambda_Aurigae> I wouldn't go below 220ohm at 5V
[08:18:40] <Roter> but, if i used ohms law, shouldnt everything be okay?
[08:19:08] <antto> what would be the voltage across the LED?
[08:19:08] <Lambda_Aurigae> is there a 3.6 volt drop across that LED?
[08:19:53] <Roter> no, i would just connect a 5v mcu to the led and then to ground
[08:19:58] <Roter> also the resistor before the led
[08:20:19] <Lambda_Aurigae> I'm asking about where you get that 3.6V from
[08:20:51] <Roter> the led
[08:21:05] <Lambda_Aurigae> that's not the voltage drop though..
[08:21:13] <Lambda_Aurigae> what is the resistance of the LED?
[08:21:35] <Roter> http://www.lemona.lt/index.php?page=item&i_id=52132
[08:21:41] <Roter> thats all i know about it
[08:21:56] <Lambda_Aurigae> put an ohmmeter on it!
[08:21:57] <Roter> it doesnt say the internal resistance
[08:22:14] <Roter> well, i dont have the led here
[08:22:25] <Roter> i was just looking to buying it or a difrent one
[08:22:40] <Lambda_Aurigae> again, I'm back to, minimum 220ohm
[08:23:05] <Roter> i dont want to be rude, but why 220ohms? just experience?
[08:23:07] <antto> if it's 30 degrees viewing angle - i'd put more than 220 even ;]
[08:23:11] <Lambda_Aurigae> math.
[08:23:16] <Lambda_Aurigae> 5V / 0.02A
[08:23:42] <Lambda_Aurigae> from experience, I use 330ohm generally.
[08:24:15] <antto> http://i.imgur.com/E1IDOKX.jpg <- 10K at 5V
[08:25:03] <Roter> alright then, will report probably tomorrow if it works or explodes.
[08:25:18] <Roter> the leds 1 and 2 show the effect right?
[08:26:29] <antto> most of them weren't lit during the photo
[08:27:18] <antto> http://www.youtube.com/watch?v=gQdjkCsW8aY
[08:27:33] <Lambda_Aurigae> looking at the official math, you do subtract the drop voltage from the feed voltage.
[08:27:48] <Lambda_Aurigae> so, yours should be fine.
[08:28:00] <Lambda_Aurigae> but to be safe, go with 100ohm.
[08:28:34] <Roter> but, if i forgot to put a resistor, would it explode, or just burn a little?
[08:28:51] <Lambda_Aurigae> they burn real bright for a short time.
[08:29:19] <antto> it'll light up very bright, and then fade away into silence
[08:29:27] <Lambda_Aurigae> I've run LEDs on 9V for short periods...very short periods....
[08:29:35] <antto> yup
[08:29:43] <antto> very very short periods ;]
[08:29:43] <Roter> well thats no fun
[08:29:48] <Roter> how about 12V
[08:29:55] <antto> shorter then
[08:30:05] <Lambda_Aurigae> they generally won't blow up.
[08:30:17] <Lambda_Aurigae> melt a little, and possibly emit magic blue smoke.
[08:30:30] <Roter> alright then,i guess that a good thing, that they dont blow up.
[08:31:00] <Lambda_Aurigae> now, connect 110VAC to a 4700uF 16V cap and it will go boom.
[08:31:47] <Roter> yeah, i believe i saw a video of them blowing up.
[08:32:07] <Lambda_Aurigae> and, for a really impressive display, connect 110VAC to a LiPo 3V cell..
[08:35:36] <Roter> found a difrent led, that was actualy in stock, and it needs 120 ohms, so i will try a 130 ohm resistor and a 330ohm resistor
[08:35:37] <Roter> for science
[08:37:12] <antto> i like blinky but not blinding blinky
[08:37:57] <Lambda_Aurigae> last time I bought resistors, I got a roll of 330ohm resistors...that was 5000 of them.
[08:38:22] <Lambda_Aurigae> last time I bought resistors, I got a roll of 330ohm resistors...that was 5000 of them.
[08:38:48] <antto> those leds i have would f*cking blind me at anything even near 1Kohms
[08:39:11] <antto> at above 6K they were okay, so 10K was ideal
[08:39:12] <Lambda_Aurigae> I also got 1000 each of red, green, and yellow rectangular LEDs
[08:40:03] <Lambda_Aurigae> in those quantities I paid 0.01 each for resistors and 0.03 each for LEDs.
[08:40:12] <Lambda_Aurigae> in US Dollars
[08:40:31] <Roter> wow!
[08:40:31] <Lambda_Aurigae> think the resistors were cheaper than that even.
[08:40:32] <antto> it's very hard to get diffused wide-angle leds
[08:40:52] <antto> had to buy em from ebay
[08:41:00] <Lambda_Aurigae> naa.
[08:41:07] <Lambda_Aurigae> digikey will have them.
[08:41:15] <Roter> 20-60micro candel wouldnt be bright tho?
[08:41:18] <antto> digikey is overkill
[08:41:23] <Roter> i believe it wouldnt
[08:42:14] <antto> ..i'm not in america ;]
[08:42:19] <Roter> also this just appeared to me: This nickname is registered. Please choose a different nickname, or identify via /msg NickServ identify <password>.
[08:42:22] <Lambda_Aurigae> digikey sells worldwide.
[08:42:27] <Roter> so i have to change nick?
[08:42:37] <Lambda_Aurigae> Roter, probably...someone else has it registered.
[08:42:47] <Roter> alright thanks
[08:43:18] <antto> Lambda_Aurigae digikey charge like 40 bucks extra if you're purchasing below a given amount of money
[08:43:28] <Lambda_Aurigae> if they try to get online with their nick they might kick you off.
[08:43:40] <Lambda_Aurigae> antto, yeah, you do gotta spend a minimum amount.
[08:43:41] <antto> and since i needed about 100 leds only - it would have costed me something like 40+something O_o
[08:43:50] <Lambda_Aurigae> try futurlec.com if you don't mind waiting 2 to 5 weeks for parts.
[08:44:07] <antto> yes, i'd rather wait
[08:44:15] <Lambda_Aurigae> not sure if they have what you want though.
[08:44:23] <antto> probably not
[08:44:35] <antto> nice diffused LEDs are always out of stock it seems
[08:44:45] <antto> unless you want some huge quantity
[08:45:35] <Lambda_Aurigae> and futurlec has 1/4 watt resistors for 0.01 each in 10 quantity
[08:49:33] <johnwalkr> holy jeez
[08:49:40] <johnwalkr> just buy leds and resistors
[12:01:05] <chickensk> hi. do somebody of you use realterm capture data to txt ?
[12:01:44] <Lambda_Aurigae> I do capture of data to text on occasion.
[12:01:55] <Tom_itx> you should be able to
[12:02:03] <Tom_itx> it's a quite versatile com program
[12:02:19] <Lambda_Aurigae> oh...realterm...duh...
[12:02:22] <chickensk> yes it works, but how do you use your captured data ? say i would like to make a graph
[12:02:26] <Lambda_Aurigae> thought you meant realtime
[12:02:48] <Tom_itx> you push the 'capture' tab
[12:02:53] <Lambda_Aurigae> I use tera term pro when I have to do it in windows.
[12:03:14] <Lambda_Aurigae> and cat in linux
[12:06:32] <chickensk> so the problem is (if this is a good forum for that) put this 8bit hex data http://pastie.org/8691647 to graph. i found some soludions using java and gnuplot, which is far from my knowledge
[12:08:45] <Lambda_Aurigae> I would separate it out to one byte per line then import it to libreoffice and plot from there unless I needed it done automagically.
[12:10:47] <chickensk> is there any program to make it automatically ? i would like to use longer files than this one
[12:11:20] <Lambda_Aurigae> gnuplot and your choice of scripting language.
[12:12:12] <chickensk> i have gnuplot installed already but it seems pretty complicated. ill try to understand. thanks.
[12:12:31] <Lambda_Aurigae> there are many tutorials out there for it.
[12:29:39] <hetii> Hi :)
[12:34:10] <Lambda_Aurigae> hi hetii
[12:34:36] <hetii> What is better to use for pin/port manipulation? Define macros like #define LED_OFF PORTB=!_BV(PB4) or use inline functions like: inline void LED_OFF(void) {PORTB=!_BV(PB4);}
[12:34:37] <hetii> ?
[12:35:11] <Lambda_Aurigae> whatever works for you.
[12:35:23] <bitd> I dont think it really matters.
[12:36:20] <Tom_itx> PORTx |= (1<<PINx)|(1<<PINx);
[12:36:48] <Tom_itx> PORTx &= (1<<PINx);
[12:41:50] <hetii> Well i plan to have one place where all hardware stuff are defined (important if you migrate code to other uC) also the #define macros are not validate by compiler so suppose inline function is better int this scenario.
[12:42:58] <chickensk> i use PORTC |= (1 << PC4); .. PORTC &= ~(1 << PC4);
[12:46:16] <hetii> hmm this is other point that i want to ask about PCx macros. Why they was added. There is no different if you will have PORTC |= (1 << 4); and still you see that its pin 4 of portc.
[12:46:49] <Tom_itx> for reading not writing
[12:49:27] <Lambda_Aurigae> the macros are just there for simplified reading by programmers.
[13:03:24] <The_Coolest> Tom_itx I use PINx = to toggle a pin
[13:03:48] <taken90> hey everyone, I'm doing a malloc with the gcc and it allways returns a null pointer. Why is this so, do I have to concider something else? I test it on a atmega644 and atmega1284p. Here is the code: http://pastebin.com/idvNLWHm
[13:04:27] <taken90> consider*
[13:05:04] <Tom_itx> The_Coolest, you can but it's an undocumented feature
[13:05:15] <The_Coolest> taken90 try several consecutive mallocs
[13:05:41] <The_Coolest> ye
[13:07:22] <taken90> The_Coolest: Dosn't work neither (http://pastebin.com/jWLxFHzg)
[13:08:24] <The_Coolest> that code will turn the pin on
[13:08:29] <The_Coolest> and leave it on
[13:09:16] <taken90> if one of the mallocs works, but the bin is'nt on ... :(
[13:09:25] <taken90> I'm using avr-libc 1.8.0-5
[13:09:32] <taken90> pin*
[13:09:50] <The_Coolest> http://pastebin.com/ck52WFgK <<
[13:10:08] <The_Coolest> oh oops
[13:10:14] <The_Coolest> weird. idk
[13:10:54] <taken90> no, your code doesn't work neither
[13:11:11] <The_Coolest> yeah i figured
[13:11:58] <The_Coolest> I used malloc a few times in my arduino code, but it was on a 328p. never had a problem. but dunno why it wouldn't work on the x4 chips
[13:12:22] <taken90> I also test it on a different system (of a friend), but it has the same behaviour ...
[13:12:45] <taken90> If I use simavr or simulavr it works!
[13:12:45] <The_Coolest> try calloc? :p
[13:13:13] <The_Coolest> also where is nullptr defined. try NULL
[13:13:35] <taken90> c++11
[13:13:46] <taken90> calloc neither ...
[13:13:47] <The_Coolest> meh
[13:15:14] <The_Coolest> well if you're using c++ why are you using malloc
[13:15:17] <The_Coolest> try new
[13:17:00] <taken90> new isn't defined at the avr platform
[13:17:17] <The_Coolest> did you try it?
[13:18:08] <The_Coolest> works fine here
[13:18:37] <The_Coolest> but then again i used arduino
[13:18:40] <taken90> yes, i tried it
[13:19:03] <taken90> avr-libc version?
[13:19:04] <The_Coolest> well I'm not an expert on AVR
[13:19:30] <The_Coolest> I think arduino just defines new to malloc, not sure
[13:19:42] <taken90> yeah, they do
[13:22:04] <taken90> https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/new.h
[13:22:20] <taken90> and https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/new.cpp
[13:25:13] <The_Coolest> hmmm
[13:28:22] <taken90> i will try it on a 328 myself ...
[13:45:27] <taken90> same on a 328! :(
[13:47:15] <taken90> I don't get it, in the simulator it just works fine ...
[13:53:23] <Lambda_Aurigae> simulator might not be perfect.
[13:55:39] <taken90> Lambda_Aurigae: yeah, but malloc is all done in software, there is no mmu ...
[13:56:09] <Lambda_Aurigae> but the simulator might be handling something strange.
[13:56:20] <taken90> the code is even quite simple and easy to understand
[13:56:22] <Lambda_Aurigae> or setup between simulator and real chip might be just a bit different somehow.
[13:56:37] <taken90> of course
[13:57:50] <taken90> could someone try the code on their setup?
[13:58:10] <taken90> maybe with a different avr-libc
[13:58:29] <Lambda_Aurigae> nowhere near my hardware at the moment.
[13:58:39] <Lambda_Aurigae> in my living room and electronics stuff is across the street.
[13:58:50] <taken90> ok, thanks anyway
[14:00:15] <taken90> I have 1.7.x version in the repo, I will try that one ...
[14:36:34] <hetii> i try run http://www.tuxgraphics.org project with Atmega128 but had no response from my enc28j60 module. The mosi like of uC should be connected to SI or SO of enc... ?
[14:36:51] <hetii> *s/like/line.
[14:41:10] <Lambda_Aurigae> mosi...microcontroller out, serial in.....
[14:41:23] <Lambda_Aurigae> so, should go to the SI or serial in one would think.
[14:57:04] <hetii> Hmm http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=69047
[14:57:20] <hetii> in those link somebody crossover the lines ...
[15:09:21] <PoppaVic> snuffleupegus
[15:30:07] <balrog-k2n> so, i have an arduino powered from a usb adapter from a laptop, my code doesn't really work, but... it kinda works if /dev/ttyUSB0 is not opened, if i simply open /dev/ttyUSB0 in a terminal without sending anything it behave differently, how's that possible?
[15:30:15] <TLoFP> How could one do a type of fail over between clock sources? Specifically I would like to update the RTC in the XMega via an external PPS. However, if the PPS fails for some reason I want to use a watch crystal as a backup. Is something like this feasable?
[15:30:31] <balrog-k2n> CTS and DTR are not connected, only 5V, GND, TX, RX
[15:31:32] <TLoFP> balrog-k2n: what chip? and post your code
[15:32:03] <balrog-k2n> TLoFP: atmega328p, the code is kinda big, it's an optiboot modification
[15:32:49] <TLoFP> balrog-k2n: are you running the arduino software or just using the arduino uno dev board without the arduino libraries?
[15:32:59] <balrog-k2n> prolly there's a timing issue.. i'm puzzled though how the usb connection can affect the timing without sending any actual bytes to the board
[15:33:17] <balrog-k2n> TLoFP: it's a bootloader, it doesn't use any libraries or IDE
[15:33:28] <TLoFP> balrog-k2n: what baud rate did you initialise the serial to?
[15:33:35] <balrog-k2n> TLoFP: 115200
[15:34:01] <TLoFP> balrog-k2n: and how did you initialize it?
[15:36:16] <balrog-k2n> TLoFP: like this: https://github.com/balrog-kun/optiboot/blob/master/optiboot/bootloaders/optiboot/optiboot.c#L487-L490
[15:38:25] <balrog-k2n> there doesn't seem to be any UART communication issue.. but i do wonder what can affect the board electrically when /dev/ttyUSB0 is opened or not
[15:38:30] <balrog-k2n> since nothing changes on the Tx pin
[15:38:48] <balrog-k2n> or nothing should change
[15:39:51] <hetii> It works :D I made it on my old prototype board where i connect SPI pins with ISP together and i don`t set register for ISP :(((
[15:41:38] <TLoFP> balrog-k2n: arduino does funny stuff in the loop() function that has to do with the serial connection
[15:44:46] <balrog-k2n> TLoFP: optiboot isn't linked with any arduino library (in fact any library, not even crt0.o)
[15:46:57] <balrog-k2n> but even if it was, how can the board know whether the serial port is opened on the other end without the cts/dtr pins?
[15:47:25] <balrog-k2n> that's what baffles me
[15:47:36] <TLoFP> balrog-k2n: when you connect via serial the device resets
[15:48:02] <TLoFP> the FTDI controls the reset pin on the 328P
[15:48:07] <balrog-k2n> TLoFP: if there was a DTR line, connected to the reset pin, it would
[15:48:26] <balrog-k2n> but i'm not using an FTDI chip, and i only have VCC, GND, Tx and Rx connected
[15:48:32] <TLoFP> I forget what line is connected tot he reset pin, but one of the FTDI pins is connected to the RST pin
[15:48:44] <TLoFP> balrog-k2n: you said you are running this on an arduino
[15:48:57] <TLoFP> oh
[15:49:02] <balrog-k2n> TLoFP: yeah, but it doesn't have onboard usb-serial, only serial
[15:49:10] <TLoFP> what arduino do you have?
[15:49:19] <balrog-k2n> pro mini clone
[15:50:12] <balrog-k2n> the thing is.. even if it wasn't an arduino, just a random board connected with these 4 pins to an usb-serial adapter, i can't imagine how it can know whether the port is opened on the other end
[15:50:18] <TLoFP> do you have TX/RX backwards?
[15:50:43] <balrog-k2n> don't think so, since UART communication works
[15:51:04] <balrog-k2n> it's something else in the program (using a radio chip) which is affected
[15:51:20] <TLoFP> beats me
[15:53:16] <balrog-k2n> i'm sure it's a timing issue... but even timing shouldn't be affected by whether the serial is opened on the PC.. i wish i had a logic analyzer to see if there's some change on the Tx or Rx pins
[16:52:52] <The_Coolest> hey guys a 100ohm resistor, 10uF cap in an LPF config on a PWM pin. Do you recon it's safe for the long run for an ATmega88/328? the pin
[16:53:09] <The_Coolest> may have to source\sink 50mA
[16:59:23] <The_Coolest> *echo*
[17:02:05] <TLoFP> The_Coolest: I wouldn't src that much
[17:02:47] <The_Coolest> i'm trying to come up with a simple and cheap solution for a DAC
[17:02:54] <The_Coolest> for contrast control
[17:04:34] * The_Coolest slaps TLoFP around a bit with a ThermalRight True Copper Ultra-120 Extreme heatsink
[17:04:38] <The_Coolest> :P
[17:04:41] <amee2k> how much current are you going to draw from the DAC?
[17:05:06] <TLoFP> The_Coolest: buffer it
[17:05:45] <The_Coolest> amee2k i don't think it's much, because the LCDs Vo pin actually sources a very low current itself
[17:05:46] <amee2k> if you can't at least get away with a 1kR resistor for the LPF, put some cheap opamp after it as buffer
[17:06:17] <The_Coolest> amee2k i only have 0 - 5v, and need the value to go down to 0
[17:06:31] <The_Coolest> so it can't be any opamp
[17:06:33] <amee2k> hmm... emitter follower as buffer?
[17:06:54] <amee2k> drops by about half a volt, so it'll reach the lower rail, but not the upper one
[17:07:12] <The_Coolest> a BJT?
[17:07:27] <amee2k> also, how much load are we talking about in absolute terms? 10uA? 100uA? 1mA?
[17:08:17] <The_Coolest> amee2k well... the only thing consuming current will be charging the cap
[17:08:39] <amee2k> no i meant on the DAC output in general?
[17:09:10] <TLoFP> hey do you guys think it is easy/feasable to make a low cost oscillator with a ppb stability by taking a Voltage Controlled oscilator and conditioning it with a PPS signal?
[17:09:19] <The_Coolest> it just sets a voltage level, the dac doesn't source the current
[17:12:01] <amee2k> if the load current is low, then you can probably get away with like a 10k + 100nF or something like that
[17:12:31] <amee2k> TLoFP: like, something like a phase locked loop?
[17:12:32] <The_Coolest> ah
[17:12:36] <The_Coolest> well no
[17:12:50] <TLoFP> amee2k: I don't think this would be considered phase locked
[17:13:13] <The_Coolest> anything higher than 100 ohm and the dac doesn't go down low enough
[17:13:22] <Lambda_Aurigae> TLoFP, that's what it sounds like you want to do.
[17:13:29] <The_Coolest> the source current of the Vo pin on the lcd is too high
[17:13:36] <TLoFP> i would run a counter off of the 32 MHz clk then wait for the PPS to fire an ISR that checks for the counter value, if it is above 32 million then it decreases the clk of the oscilator, proportionally
[17:13:38] <amee2k> NPN emitter follower to lose another half volt?
[17:13:52] <amee2k> well, how much *is* it sourcing? o.o
[17:14:10] <The_Coolest> i don't know. can't find it in the datasheet
[17:14:39] <amee2k> can you measure it on the actual circuit?
[17:14:50] <The_Coolest> The contrast is uaully set by using a pot as a voltage divider between VCC and GND. I want to control the contrast with the MCU.
[17:15:17] <The_Coolest> amee2k my guess is that it changes from display to display
[17:17:12] <The_Coolest> because while one lcd works well with 100ohm as the R in the RC filter, a larger display doesn't like it as much
[17:17:33] <amee2k> hmm, if you only need an adjustable range of 0-1V or so, you can use 470R on the PWM pin, and put 100R in parallel with the cap. the voltage divider scales down the voltage, but also lowers the output impediance to 100R || 470R
[17:17:39] <The_Coolest> I'd need a rail to rail op amp that can actually go down to 0
[17:18:06] <TLoFP> Lambda_Aurigae: these phase lock loops look incredibly expensive, that is why i was considering what I described above
[17:19:06] <amee2k> TLoFP: so more like free-running with perodic recalibration?
[17:19:09] <TLoFP> even relativley good VCXOs only cost about 2 bucks
[17:19:14] <TLoFP> amee2k: yes
[17:19:53] <TLoFP> even a cheap gps module gives a 10nS jitter PPS, I figure ill average that over 10 seconds and thus adjust my VCXO on a 10s time scale
[17:29:24] <bitd> Anyone still around? <.<
[17:29:41] <bitd> Whats peoples experiences with RS232 to USB cables with a STK500?
[17:29:58] <bitd> So far I have had bad ones, and worse ones.
[17:32:49] <Lambda_Aurigae> cheap ones are gonna give you fits.
[17:33:14] <bitd> I get really weird shit at times.
[17:33:23] <bitd> Specially confirming my writes.
[17:33:48] <bitd> avrdude: verification error, first mismatch at byte 0x004c
[17:33:55] <bitd> 0x2f != 0xff
[17:34:09] <bitd> Then i look up the byte, and its 0x2f.
[17:34:14] <bitd> Using avrdude dump.
[17:34:25] <bitd> 0040 80 40 90 40 e1 f7 00 c0 00 00 c5 98 2f
[17:34:37] <bitd> So it actually messed up the confirm.
[17:41:52] <TLoFP> join #hamradio
[17:41:55] <TLoFP> oops
[17:42:30] <bitd> Spammer <.<
[17:46:25] <amee2k> isn't the STK500 just a shitty handshake line bit-banger?
[17:47:20] <amee2k> cheap USB adapters with cheap (and somewhat non spec compliant) PL2303 clones tend to have poor timing on the handshake lines that causes issues
[17:47:50] <bitd> I see.
[17:49:04] <bitd> But, if I where to move on to something native usb for a programmer.
[17:49:11] <bitd> What would you recommend amee2k?
[17:49:18] <Lambda_Aurigae> get the programmer from Tom_itx
[17:49:24] <Lambda_Aurigae> small, simple, works well.
[17:49:46] <Lambda_Aurigae> usbAVR and LUFA based.
[17:49:54] <Lambda_Aurigae> and if you have problems you come in here and bug him about it.
[17:50:17] <bitd> Hahaha.
[17:50:27] <amee2k> best results? 16550 style onboard UART in a chipset
[17:50:32] <Lambda_Aurigae> I have one and it works well.
[17:50:35] <amee2k> :3
[17:50:48] <Lambda_Aurigae> although, I still use my original parallel port programmer...
[17:50:53] <Lambda_Aurigae> never had a problem with it.
[17:51:02] <amee2k> if thats too old school, i'd try to get an FTDI based one thats not a fake
[17:51:38] <bitd> Right.
[17:51:52] <amee2k> well, the parallel port lines are *supposed* to be synchronous IOs, but handshake lines are kinda... squishy
[17:52:24] <bitd> So thats whats messing up the timing, ergo the byte matching.
[17:52:35] <Lambda_Aurigae> never had a problem with my parallel port programmer....although, same with the one from Tom_itx but I don't use it quite as much.
[17:53:07] <Tom_itx> shame on you
[17:53:33] <bitd> Just usb ports on my laptop :-(
[17:53:54] <Lambda_Aurigae> I won't buy a computer without a serial and parallel port.
[17:54:11] <Lambda_Aurigae> this quad core amd I just built even has them.
[17:54:18] <bitd> Wasnt into hardware when I bought this one :P
[17:54:39] <bitd> Will not make that mistake the next time.
[17:54:47] <amee2k> hehe
[17:55:49] <amee2k> you could try lowering the transfer rate and see if that helps, if your software supports that
[17:56:19] <bitd> lol, actually figuring that out as we speak amee2k
[17:57:25] <amee2k> lowering the transfer rate /tends/ to help with a lot of programming issues caused by borderline-unsuitable hardware pushed into service as programming adapter
[17:58:38] <bitd> Aaand it crapped itself again.
[17:59:08] <bitd> Yeah, time to buy a better adapter.
[18:14:59] <Valen> get a pci serial port if you need to?
[18:24:34] <Lambda_Aurigae> likely won't help him on a notebook.
[18:24:51] <jacekowski> usb serial ports work as wll
[18:36:21] <Lambda_Aurigae> jacekowski, some do, some don't.
[18:56:14] <Valen> http://www.ebay.com/bhp/pcmcia-serial-port
[18:56:28] <Valen> or http://www.ebay.com.au/sch/i.html?_odkw=&_osacat=42323&_trksid=p2045573.m570.l1313.TR0.TRC0.Xexpress+card+serial&_nkw=express+card+serial&_sacat=42323&_from=R40 for a more modern laptop
[19:00:20] <The_Coolest> lolserial
[19:00:34] <The_Coolest> Just get a $2 usb to serial
[19:00:37] <The_Coolest> works fine
[19:01:37] <Valen> he was having issues with it
[19:01:53] <Valen> timing sensitive stuff + usb = not super happy joy
[19:02:03] <The_Coolest> hmm
[19:02:07] <The_Coolest> i guess
[19:03:11] <Valen> $15 delivered for something that should work is cheap
[20:19:20] <chickensk> hi. anyone using windows tried to acuire and analyze data from usb/uart converter ?
[20:20:46] <Xark> chickensk: You mean read/write a COM port? If so, yes. it is quite easy, even under Windows.
[20:25:02] <chickensk> xark: yes, read from com port, save that somewhere and make graph from that afterwards
[20:25:50] <chickensk> Xark: yes, read from com port, save that somewhere and make graph from that afterwards
[20:26:27] <Xark> chickensk: Should be straightforward (with graph lib or just excel etc.).
[20:30:17] <Lambda_Aurigae> could be done rather easily with visual basic I bet.
[20:30:44] <chickensk> Xark: what do you mean by graph lib ? i use realterm to get txt with hex numbers, but cant plot a graph from that..
[20:32:15] <Xark> chickensk: Well, use whatever you like on the PC for pretty graphs. I generally just import CSV (comma separated values) into a spreadsheet. However, there are graphing libraries/utilities to do this in an app.
[20:32:43] <Lambda_Aurigae> all depends on what format you want your graphs to be in.
[20:33:22] <Lambda_Aurigae> pdf, jpg, tiff, etc can be done without too much problem in visual basic or visual C++ or .net or whatever.
[20:33:43] <Lambda_Aurigae> or if you are into open source you could do it with gcc and one of half a dozen graphing libs out there.
[20:33:48] <Lambda_Aurigae> or perl
[20:33:50] <Lambda_Aurigae> or php
[20:33:54] <Lambda_Aurigae> or ruby
[20:34:42] <chickensk> i would appreciate a solution without programming for computer, i only work in C++ for 8bit AVR
[20:35:35] <Lambda_Aurigae> ok
[20:35:36] <Lambda_Aurigae> simple
[20:35:41] <Lambda_Aurigae> pay someone to write a program for you.
[20:35:48] <Xark> chickensk: OK, have your MCU app output CSV. Then just capture these to a file and import into a spreadsheet (like OpenOffice). Then use the "graph wizard" and pick the type of graph.
[20:36:10] <Lambda_Aurigae> Xark, but it has to be automated and do it all by itself...
[20:36:15] <Lambda_Aurigae> which means,,,,programming!
[20:37:05] <Xark> Uhh, yeah, TANSTAAFL.
[20:37:17] <Lambda_Aurigae> I suggested libreoffice earlier but it has to be automated
[20:37:32] <Xark> Lambda_Aurigae: Ahh, I missed that.
[20:37:35] <Lambda_Aurigae> so he wants a pre-made solution to take his proprietary data and turn it into a graph automagically for him.
[20:37:49] <Xark> I want a pony. :)
[20:38:03] <chickensk> so i am going to look into making a csv. thanks for now.
[20:38:03] <chickensk> :)
[20:38:37] <Xark> chickensk: Cool. Good luck. :)
[20:39:06] <Lambda_Aurigae> give me specifications...input format and output format and platform it needs to run on,,,and 200 dollars,,and I can probably write you something.
[20:40:03] <Lambda_Aurigae> man but the splits have been nasty today.
[21:35:53] <chickensk> hi. :) this is what i wanted, for now excelent http://en.zimagez.com/zimage/terminal191.php
[21:41:02] <chickensk> xark: look :) http://en.zimagez.com/zimage/terminal191.php for now this is perfect
[21:41:53] <Xark> chickensk: Bingo. :)
[21:44:43] <chickensk> no csv, realtime, no programming :D
[21:44:43] <chickensk> but csv opens up new possibilities