#avr | Logs for 2015-10-07

Back
[02:58:09] <rekahsoft> Hi all, I've been having issue while using an ISP..namely when the programmer is not connected I get odd functionality..I have a reset button in my circuit and after pressing that everything resumes to normal operation with or without the ISP connected
[02:59:01] <rekahsoft> I have the ISP's ground connected to my circuits ground (I'm using a atmega328P with no crystal)
[03:00:50] <rekahsoft> I also am using USART and have the ground from my usb to serial dongle connected in with a common ground with the ISP and atmega328P
[03:08:59] <rekahsoft> so it seems that when I don't plug in the usb ground (for USART) until after the atmega328p has booted everything seems to work fine? This seems to be the case with or without the programmer
[03:23:06] <Valen> rekahsoft: ground loop?
[03:23:32] <rekahsoft> Valen: very possible..didn't know that was a problem
[03:23:46] <Valen> can cause weirdness
[03:24:04] <rekahsoft> I noticed that an led that i flash during initialization will very slightly come on when i plug in the ground
[03:34:21] <rekahsoft> Valen: I still can't figure out where the issue is occurring..I've removed the ISP out of the equation but whenever I connect the usb to serial ground the led I have flash during initialization flashes (very dimly)
[03:35:05] <Valen> got a photo or something?
[03:37:54] <rekahsoft> Valen: yeah one sec :) also thanks for the hand :) I'm new to hardware
[03:38:52] <rekahsoft> Valen: https://imgur.com/Scu3sCx
[03:39:16] <Valen> ok this looks a bit exciting
[03:39:31] <rekahsoft> Valen: right now I have the ground from the usb to serial cable going through a 1K resistor to ground which alleviated the problem
[03:39:47] <Valen> what else is connected
[03:39:52] <Valen> I can see a battery
[03:40:09] <Valen> a breadboard in the middle which connects to a LCD and to another breadboard off to the right
[03:40:19] <rekahsoft> yes the battery powers the atmega328P
[03:40:53] <rekahsoft> as for the bread board on the right, it is my programmer (based off the arduino ISP programmer and running the same code)
[03:41:29] <rekahsoft> I have it connected to the RESET, MISO, MOSI and SCK lines
[03:43:24] <rekahsoft> even when I disconnect the ISP programmer I made (the breadboard on the right) the same issue occurs with the led flashing ever so slightly when the ground from the USB to serial cable is connected (but the battery is off)
[03:44:19] <rekahsoft> I know I am missing a 100nF capacitor between GND and VCC (and AVCC and GND for that matter) but currently don't have one and stores don't open for another few hours yuet
[03:44:22] <rekahsoft> yet*
[03:45:08] <Valen> that won't change anything
[03:45:21] <Valen> ahh
[03:45:33] <Valen> your usb > serial cable is probably idling high,
[03:45:47] <Valen> when you connect the ground you are stuffing power back through the AVR
[03:45:55] <Valen> (5v probably)
[03:46:26] <Valen> through the serial pin, through the body diodes and into the circuit
[03:48:13] <rekahsoft> Valen: Hmm..how can this be avoided?
[03:48:13] <Valen> that would explain it flashing
[03:48:39] <Valen> don't have the usb thing plugged in when the AVR is off?
[03:52:33] <rekahsoft> alright..well certainly a step in the right direction..this doesn't cause any damage I'm assuming?
[03:53:14] <rekahsoft> I just checked with a volt meter and there is a potential difference between my ground (on the big bread board) and the usb to serial ground..its reading -2.91V
[03:53:31] <Valen> it will damage the AVR over time
[03:53:39] <Valen> its operating outside the spec
[03:54:16] <Valen> I don't know how you are measuring a difference in ground if all your crap is battery powered and the only connection it has to the outside world is that usb > serial ground?
[03:54:38] <Valen> I mean its probably ok, but I wouldn't use that AVR in somebodies pacemaker
[03:55:12] <Valen> try putting a 10k resistor on that line, it'll probably knock the current down enough that it wont actually power your AVR at least any more
[03:55:33] <rekahsoft> I left the battery off and connected my meter to ground on the breadboard and ground comming from the usb
[03:56:11] <rekahsoft> and yes in the picture I sent you I had a 1K resistor and said it had solved the issue..perhaps i'll swap in a 10K one for good measure...
[03:56:59] <Valen> you said on the ground for the usb
[03:57:04] <Valen> I meant for the signal
[03:57:24] <rekahsoft> for which signal?
[03:57:38] <Valen> on the serial line from the usb > serial to your AVR
[03:58:20] <Valen> did you still have that resistor in when you did that measurement?
[04:02:30] <rekahsoft> awe..I understand what you're saying now..let me make sure..so the usb to serial is keeping its TX line high and thus when I connect the ground from the usb-serial dongle I end up with current flowing through the AVR..if a resistor is put in place on the TX line from the usb > serial as you had mentioned then this wouldn't happen anymore
[04:02:38] <rekahsoft> just tested it and it seems to work :)
[04:05:35] <rekahsoft> Valen: does that make some sense or do I need to hit the books harder? lol
[04:06:09] <rekahsoft> Valen: thanks for taking the time to help :) hardware isn't my strong suit (certainly need more time in the books)
[12:01:11] <sabesto> is it cool to show off that you know dec, hex, oct and their values in ASCII when writing code? http://svn.savannah.nongnu.org/viewvc/trunk/avrdude/butterfly.c?root=avrdude&r1=948&r2=991
[12:02:09] <sabesto> 239:~263
[13:20:41] <arewovsky> someone could look at this paste http://pastebin.com/x6UzbCAa
[13:21:58] <arewovsky> Im trying to make FAST PWM on 16bit timer
[13:22:18] <arewovsky> on atmega328p
[13:24:36] <arewovsky> I have led connected to PB1 but it lights with the same intensity no matter what I assign to OCR1A
[14:54:15] <Chillum> When setting the fuses to use the internal oscillator on an atmega328 setup to use an external 16Mhz crystal do I need to have the 16Mhz xtal and caps on it or no crystal on it?
[14:54:35] <Chillum> ie do I setup it up for how it is configured, or how I want it to be configured?
[17:59:24] <Chillum> this place is dead
[19:40:33] <MarkX> hey, is there an existing commonly used library for attiny85 i2c using USI?
[19:44:07] <Tom_itx> none i'm aware of