I am working on a custom carrier board using a TI microcontroller as the master and an ADC IC as the slave. It appears that sometimes SCL will stay high when it shouldn't, almost like the master releases it. We only get this fault condition on a reset of the MCU (or total system power cycle) but it does not happen every time, maybe one out of ten on average.   Data transfer will be fine most of the time, until one of the unlucky resets causes the issues. You can see in the image below that after the address byte is sent SCL just goes high after a few clock pulses. Any ideas?
122035
I have a problem with an I2C communication and want you to ask whether there is a better solution than mine.  I am programming an STM32F103 at the moment. There is one sensor (MPU6050) which is connected via I2C to the STM32. I recognized that if I reset the STM32 a few times, the STM32 gets stuck (or got an timeout error) during the initialization of the I2C. The timeout error was during the wait of the busy flag. So the I2C communication was "occupied". The MPU6050 is the only other I2C device (slave).  In my opinion there is an error, because I was reading a register from the MPU6050 when I reset the STM32. So the MPU6050 never gets the stop condition.   I do not know how to reset the I2C connection, when the bus is "occupied" (by the MPU6050). So my solution would be to do a hardware reset with a transmission gate of the MPU6050. Is there maybe a simpler software solution?  Thanks for the help.
27486
In AVR datasheets under the Electrical Characteristics section you will typically find a graph like this (this one is from the ATMega328):    I've seen designs that seem to "work" but operate outside the shaded envelope. Specifically, I've seen 3.3V (Arduino) designs that run the clock from an external 16MHz crystal. Clearly, this is out of spec. What are the practical negative consequences of running outside this envelope?
122430
I'm experimenting with writing a software UART on my microcontroller using GPIO pins. This is to temporarily add a UART channel on a project until we get the new design implemented that uses a uC with more UART ports.  What I'm having difficulty with is correctly detecting a start bit in a serial stream. The source of the stream is external and doesn't care when my device powers up. So it's very likely that my device will power on and start seeing data bits in the middle of a byte transmission. Undoubtedly, that will cause my software UART to read erroneous values, as it won't be able to tell the difference between a start bit and any other high-to-low transition.  Is this an inevitable issue with a UART channel? Or is there some clever trick that the uC manufacturers use in their hardware UARTs?
33406
What I found in the event log is some information that apparently the system was reactivated from standby mode, but I definitely shut the system down regularly. This happens all the time. What is it, some faulty ACPI config?
15710
I saw several bugs and error messages when I was looking by chance into the tool called "logs".  Being a newbie in Ubuntu I have no idea how to deal with these bugs, where to report them or how to fix them.  Any help to guide me here?  The bug I have (which is listed under important) reads:  [Firmware Bug]: TSC_DEADLINE disabled due to Errata; please update microcode to version: 0x52 (or later)
20952
BMA180 accelerometer can be either SPI slave or I2C slave.  The pins for both buses are shared.  SPI mode                    I2C mode --------------------------------------------------- SDI  input                  SDA  bidirectional (!) SDO  output                 ADDR address bit, input SCLK input                  SCL  input CSB  chip select, input     I2C  mode select, input   According to , the selection between buses is done through the CSB pin.  When CSB is low, the device is an SPI slave.  When CSB is high, the device is an I2C slave.  Here's a failure mode, which I'm concerned about.  Suppose, BMA180 is on the SPI bus.  There is also another device on the same bus with it’s own chip select.  Suppose, SPI bus master is communicating to that other device.  CSB for BMA180 is high, so it’s I2C should be enables.  BMA180 sees clock edges on SCL (SPI's SCLK) and bits on SDA (SPI's MOSI) flying by.  What if some of these bits look to BMA180 like a start of a valid I2C read transaction, and BMA180 starts to output data and clobbers the existing SPI transaction?  How would the design of BMA180 prevent that?  This is a matter of curiosity.  I haven’t experimented with these issues yet.  I will be using BMA180 on SPI.  Any suggestion, insight or reference is really appreciated!  Update.  Found something in .  It recommends disabling I2C by setting the dis_i2c bit, if communicating with BMA180 via SPI.      When SPI interface is used, it's highly recommended to set dis_i2c to   1 to avoid malfunction.   BMA180 has built-in EEPROM.  Register contents can be stored in the EEPROM and automatically loaded on power-up sequence.  So, it's possible to make BMA180 ignore I2C completely and always.  Update.   is another IC, which shares pins between I2C and SPI in a a similar way.  It doesn't seem to have a bit setting for disabling the I2C mode.  So, it would require an OR gate like ADXL345, which @markrages brought up.  Heads up!  Bosch stopped shipping BMA180 ().
69024
I'm quite new to electronics and I'm having a hard time understanding the "pull-up resistor" principle. I have read a lot of articles about that, and I think I've got it but I'm not 100% sure so I have a question. In , after the first image, it says:     When the momentary button is pressed it connects the I/O pin to Vcc and the microcontroller would register the input as a high.   But I don't get it. Where is VCC? From what I see, there is no power source on this schema, just a microcontroller wired to a button that are both wired to ground so how can there be any voltage at all in this circuit?
111767
In a nutshell, the problem looks like this picture:    In short, gigantic latency, very slow read speed (I assume that is caused by the same thing). After a very very painful few minutes, everything seems to go back to normal.  What the heck is going on that can cause that?  Note: Note the fact that 100% activity happens at a wide range of speeds.
42278
When I set up a redstone circuit for rotating blocks (with pistons) or flashing redstone lights, everything's fine, but when I exit that zone, the current is not saved, and when I return later, the blocks have stopped moving or the lights have stopped flashing.  I don't want to reassemble part of the circuit each time I come by -- How can I keep the redstone circuit running when I'm far away?.
28893
I think I may have found an instance of "hill-billy" wiring in my circuit box.  I have a 15A GFCI breaker.  Strangely, it is hooked up to the up stairs bathroom AND the outdoor outlets.  Recently it has started to perform poorly.  It either trips easily or doesn't work after reseting the breaker.  I opened up the panel and was surprised to see what looks like two circuits wired into the breaker.  That is, you have a two pairs of black/white (hot &amp; neutral I presume).  The hot lines are going into the breaker together (on the top) and the same with the neutrals (on the bottom).  Is there any valid reason for this? It seems like the installer was lazy and because there isn't much room left on the panel they wired these two circuits into one breaker.  UPDATE:  This is a Bryant circuit breaker box from the late 80's.  The GFCI breaker was a 15 amp Sylvania which raised a bunch of eye brows when I brought it into the electrical supply place. Now it sounds like everyone makes "BR" compatible breakers including Eaton.  I ended up getting an Eaton breaker from Home Depot and only wiring in one pair of wires (the wiring to the outside sockets).  Seems to work fine.  I am going to buy another breaker and put it in one of the open spots in the box.  My guess is that whomever was last in this box didn't want to spring $40 for a second GFCI breaker.    UPDATE 2:  Thanks for the comments!  Giving that the house was built in 1986 it seems like it was standard to use one GFCI for multiple outlets.  In my case - this certainly caused problems over time and I am replacing with multiple GFCI breakers.
65808
I've gone through the complete , searched SE and on google, but I cant seem to find this information: Whats the output Voltage of QA..QH just after power-up when G (Output enable) is pulled low, but no data have been clocked into the shift register?
110269
I have a   arduino microcontroller other digital thing   and when I connect a   motor pump heater other high current thing   I experience   weird ADC measurements reboots crashes errors in digital communication other unexpected behavior   My power supply is properly sized to power all these devices. I don't have an oscilloscope so I can't see much what's actually happening in the circuit. What's a likely cause?
21351
I modified my Sega Master System to have a pause button on the actual controller. To process the signal, I soldered a quad NOR gate to the I/O and CPU circuits in the console. The idea is that the controller pause button sends a combined UP/DOWN signal, and the gate processes it and sends an NMI to the CPU, which is what the Pause button on the actual console does. This is the procedure recommended at the SMSPower forum, and I followed their diagrams.  Here's the thing: I installed the gate upside down, so that the packaging is resting on the circuit board, and the pins are sticking up in the air. I did this so it would be easier to solder the pins to the console, reasoning that the package is non-conductive anyway. When I tested it out, it didn't work correctly. As I was troubleshooting with my logic probe, I accidentally dislodged the Vcc connection, which I had soldered to a +5 Vcc solder point on the board. All of a sudden, it works correctly! I've checked the pin assignments over and over, and I'm positive that the Vcc pin isn't connected to anything; yet, the chip has power, and works as it is supposed to.  So, what is going on here? Was it a bad idea to install the chip package so that it touches the board? And why is the chip working when the Vcc pin is disconnected?  (edited to add requested information)  The gate is a CD4001AE Quad NOR; the datasheet is here:    The schematic is here, at the bottom of the page:
26197
I have an 8051 MCU which I use keil to program it with C. My problem is that the micro-controller restarts at the end of some functions while they should return.  Using a debugger I tried to check it line by line. And I figured out the the MCU is not restated right after the end of the function. The PC(progam counter) goes to somewhere else (sometime somewhere that there is not any code to execute) and then it increases one by one until the end of code. It is very strange for me because I write my code in C and never seen the type of error previously.    I think this problem might be related to the compiler settings and thus I post the settings here:   Assembler settings: XR GEN DB EP NOMOD51  Compiler settings:  DB OE BR LARGE OPTIMIZE(11, SIZE) DEFINE(SILABS_PLATFORM_WMB912) DEFINE(SILABS_WMCU_SI106x)  Linker settings: CODE REMOVEUNUSED CLASSES(BIT(0x20.0-0x2F.7), DATA(D:0-D:0x7F), IDATA(I:0-I:0xFF), XDATA(X:0-X:0xFFF), CODE(C:0-C:0xFBFF), CONST(C:0-C:0xFBFF))  I tried both large and small settings but the problem remains. Kindly help me if you know the reason.
6269
I wanted some opinion on my set up here, just to make sure I got the basics right.  I have a Li-ion battery charging circuit based on the MCP73113. This is designed to be a single-cell battery charger.   The battery itself (3.7V, 650mAh) comes with its own PCB with Schottky diode and current regulators as protection. EDIT: Not a Schottky diode. Current limiter and a Protection IC.  By design, they work together just fine.  I have more batteries from the same manufacturer and wanted to make higher capacity packs by putting two cells in parallel. The two cells come with their own PCB, but I only kept one of them, as I soldered their leads together. It seems to work and they are charged and discharged just like regular batteries (3.7V, now 1300 mAh).  However, not all the packs I made work smoothly and I get a failure rate of 2 in every 10 packs. They all start out normally, but occasionally when the batteries are not charged for some time, or are used up, they tend to not work anymore. So far, in only 1 pack I found the voltage to be different (both now below 2V, aka dead).  I assume my method is not the right approach to ensure 100% success rate, so I was wondering how can this be solved. All the controllers I looked into was designed for multiple cells in series, not parallel. Am I fundamentally missing something here?
119972
I've been to a couple introductory Altium trainings and everything goes fine and dandy. This is the actual first board I am working on by myself. I've been learning so much just by doing stuff myself but there is something that I can't seem to quite understand.   Whenever I transfer my schematic to the PCB is is placed inside this reddish box, I believe it is a Room. All the examples I saw during training didn't do this. And if I move the components outside the box they turn green (DRC error maybe?)  Does anyone know what this means?
63067
I am having this microcontroller -   I am using an 8MHz external clock. I want to calculate the Bit error rate of my LIN Communication. My LIN Communication Baud rate is 19.2kbps. My questions :  Can I use the LPUART Module in the Mirocontroller for the LIN Communication?  How to find the Bit error rate for the LIN Protocol communication for my baud rate of 19.2kbps and external clock of 8MHz.   I found this below from the reference manual. But not sure, how to calculate the Bit error rate from this.   How to calculate the SBR Register value, OSR and the LPUART ASYNCH Module clock?  Please help