New answers tagged

0 votes

Ethernet questions - SPE

Possible, yes. Ethernet is an AC-coupled signaling method, meaning there is spare bandwidth below the signal, where DC could pass. The basic method to do this is called a bias tee. A balanced type ...
Tim Williams's user avatar
  • 17.7k
0 votes

STM32 create a microsecond timer

The answer given by Codo (from the Arduino core) actually behaved glitchy for me. I am running on 6 MHz and therefore SysTick->LOAD is 5999 in my case. I was calling GetMicrosFromISR() from higher ...
HansW's user avatar
  • 1
2 votes

What are the steps an 8-bit processor must perform to read/write an integer variable in memory?

The compiler writes a single instruction of assembly code or machine code, to store (some value) at (some address). Here's a sample of the instructions it can use in AVR (ATMega and ATTiny) and their ...
user253751's user avatar
  • 11.6k
1 vote

Why am I getting the wrong timer frequency in PIC microcontroller application?

I was able to load and run the OP's original project, and the simulator stopwatch shows the timer interrupt occurring at 133 us intervals. The yellow LED toggles with about 660-675 us. The PICkit3 is ...
PStechPaul's user avatar
  • 6,644
0 votes
Accepted

Hardfault STM32 on SystemClock_Config()

Turns out, it was a soldering issue indeed. A couple of MCU pins had no solder contact and it is fixed now. Thanks for the inputs everyone!
dreamcoder's user avatar
1 vote
Accepted

Interfacing HD44780 LCD with PIC16F690 in C (XC8 compiler)

lcd_send_nibble is problematic because you send everything in sequence, not at once. You keep writing to the same register over and over, so it will work like this: ...
Lundin's user avatar
  • 17.1k
4 votes
Accepted

Why am I getting the wrong timer frequency in PIC microcontroller application?

When TMR0 overflows, its interrupt is triggered, while TMR0 merrily keeps incrementing every microsecond...TMR0 has already incremented some few # counts before it gets reset to its new value. Since ...
glen_geek's user avatar
  • 22.3k
1 vote

Are there microcontrollers for 4K resolution image capture?

I think you should be looking at microcontrollers with external memory peripheral support. A 4k frame stored as 32 bit pixels is ~265Mb (3840 x 2160 x 32). Something like a MX25LM51245 512M bit ...
Spehro Pefhany's user avatar
0 votes

Power Cycling USB

You show a 3.3 Volt logic signal driving the 2N7000. Looking at that datasheet, several of the device parameters are important: ...
rdtsc's user avatar
  • 15.3k
1 vote

Power Cycling USB

You cannot toggle GND for USB. If ground is disconnected, voltage form VBUS leaks out via the data wires, making the computer think a device is being plugged in. Since the computer cannot talk to the ...
Ferrybig's user avatar
  • 1,005
0 votes
Accepted

Zero Crossing Detector

If a signal is required for both positive and negative zero crossings are needed, here is a simulation of one way to do it. There will be some timing differential between zero crossing and the output ...
PStechPaul's user avatar
  • 6,644
0 votes

How to modify existing circuit to additionally control it from outside by raspberry?

I can't yet comment, but keeping autonomous control is a GOOD thing, to which you can then add automation. You really don't want the situation where the RPi goes down and then you're stuck in the ...
jimc's user avatar
  • 1
-1 votes

Power Cycling USB

If you want to brute force, you can wire a GPIO to reset pin and pull the microcontroller to reset. Once it restarts the GPIO will be in high impedance mode and allow the microcontroller to boot. The ...
Ralph's user avatar
  • 2,851
1 vote
Accepted

Will this MOSFET H-bridge motor control with end of travel disable switches work?

I thought it might be useful to draw up one or more alternative circuits for an NMOS/PMOS bridge driver: simulate this circuit – Schematic created using CircuitLab This was tested using two ...
PStechPaul's user avatar
  • 6,644
-1 votes

Can I program an STM32 blue pill with Arduino Uno?

The Arduino IDE assumes there's an arduino bootloader on your device that accepts data via serial. If that's not the case, the Arduino IDE doesn't know what to do. You would need to get one of these ...
Marcus Müller's user avatar
0 votes

How connect the STlink on NUCLEO f401RE to communicate with STM32F4 discovery?

I am assuming you want to connect two boards using USB cable and establish serial communication between them. The Discovery board has USB Micro-AB port with OTG support (CN5). This can work as USB ...
Maple's user avatar
  • 11.5k
4 votes
Accepted

ESP32 USB-C connectivity issues with CP2102N

TXD and RXD are incorrect. Both example schematic links confirm it. TXD of one chip must be connected to RXD of another chip. And since critique was requested, why bother putting 3 resistors, 10k+10k+...
Justme's user avatar
  • 119k
0 votes
Accepted

i8253 manual programming by direct signal input

The read and write are active low. You are not writing to chip but reading from it.
Justme's user avatar
  • 119k
2 votes
Accepted

Identifying chip used in motion-sensing light

It's a Microne ME9101 as you suspected. The line about the 21 GPIOs in the english page is just an error, they probably swapped the numbers and it should read 12. It also says 12 GPIOs further down ...
nanash1's user avatar
  • 805
2 votes
Accepted

Multiple individually controlled lights and buttons widely separated

i have workend on such a system previously. I will outline the design decisions and the chosen path - you can reuse it or change it according to your requirements. Requirements: Useable for ...
ElectronicsStudent's user avatar
1 vote
Accepted

Microcontroller DC analysis Voh(min) from the datasheet

A datasheet can specify either the minimum VOH at a certain test current, or the minimum IOH at a certain test voltage. The FS32K148HAT0MLUT datasheet uses the second choice. That test voltage (VDD − ...
CL.'s user avatar
  • 17.5k
2 votes

Use cases for "low pin-count" FPGAs

Serial protocols can be timing-critical and complex enough that you can't do them on a microcontroller reasonably, but they only need few IO lines and often very little memory. As an example, consider ...
Marcus Müller's user avatar
1 vote

Enter variables to microcontroller in external program

This is a common challenge faced when developing or integration embedded systems. Hyphothesis: All (All is a strong quantifier for sure) embedded systems need to be able to receive data from a host/...
ElectronicsStudent's user avatar
3 votes

Enter variables to microcontroller in external program

You could use I2C, but it might be easier to use serial communication with a USB to serial converter (TTL level output). Then you just have to set up the UART on the MCU to something that agrees with ...
Spehro Pefhany's user avatar
2 votes

Will this MOSFET H-bridge motor control with end of travel disable switches work?

Here is a way to implement a full bridge with NMOS and PMOS: simulate this circuit – Schematic created using CircuitLab The logic states are shown on the schematic with H and L for 3.3V and 0V....
PStechPaul's user avatar
  • 6,644
2 votes

Will this MOSFET H-bridge motor control with end of travel disable switches work?

You must make sure that the upper and the lower MOSFET are not on at the same time, this would cause a unlimited current. If you do not know the maximum current over the coil, then do not build it on ...
MikroPower's user avatar
  • 1,303
3 votes
Accepted

I have a rechargeable battery pack that is fully charged, the batteries aren't heating up and the charge controller won't shut off. Tick, Tick, Boom?

I usually find when I am having problems with something like this it is helpful to go back through the datasheet/manual/quickstart and look for assumptions I have made that aren't necessarily true. I ...
Matthew Huber's user avatar
1 vote

Implementation of microsecond timer on NRF52832 using sandeepmistry nrf52 library

You're trying to do PWM in software, by employing the hardware timer units just to trigger your software. That makes no sense. Instead, use the hardware timer units directly to create PWM. On the ...
Marcus Müller's user avatar
1 vote

MSP430G2553: ISR not triggering when I2CTX-Flag is set

So I solved it in the meantime… My problem was, that I had reset the hold bit (UCB0CTL1 &= ~0x01) after enabling the Interrupts (IFG2) in the I2c_init function, which where then reseted and thus ...
Steve's user avatar
  • 21
1 vote

Access of flag by CPU

It depends on CPU. Some can access a single bit and some don't. In any programming language you can store 8 flags per 8-bit byte yourself or with the help of the language if it supports the feature, e....
Justme's user avatar
  • 119k
2 votes
Accepted

Access of flag by CPU

Traditionally, Accessing a single bit requires reading the entire word, masking the single bit of interest then acting on the result. Modifying a single bit required a read, mask and modify, ORing or ...
RussellH's user avatar
  • 10.5k
0 votes

Access of flag by CPU

A simple CPU with an 8-bit bus will simply access 8 bits at a time, as part of a single memory operation which isn't divisible further. This is the case for anything from a tiny AVR that reads an 8-...
nanofarad's user avatar
  • 17k
1 vote
Accepted

Package and footprint - Are they correct

TL;DR; In this particular case, the Microchip footprint you found looks perfectly reasonable for the Atmel part. Bear in mind that Atmel was acquired by Microchip, so it's not suprising that the ...
Tom Carpenter's user avatar
3 votes
Accepted

STM32F407VE Save 4 bytes in flash Issue

Without using hal: eeprom.h: ...
Al a's user avatar
  • 41
0 votes
Accepted

Connect multiple PPG sensor to developing board

The sensor has an i2c interface with a fixed address, so you can't just connect all 6 sensors to the i2c interface of the microcontroller. However you can solve the problem with an i2c multiplexer (...
Mark Leavitt's user avatar
  • 4,783
1 vote

What could be the reason for an overheating Arduino? [using TWO different power supplies]

Quite some time ago I had encountered a similar issue with the Arduino Mega board where the USB connection could back-feed the external supply circuit through a MOSFET body diode on their PCB. This ...
Chris Knudsen's user avatar
-1 votes
Accepted

Holtek HT16C21 not Acknowledge the I2C Slave address

Issue resolved. The problem was the diode that is connected on the SDA line for reverse protection (I think), which prevented the HT16C21 pulling down the SDA of the PIC16F628A while acknowledging. I ...
Adil Ahmed's user avatar
3 votes

What controls battery discharge? Can you use a transistor to lower the amount of battery capacity used?

A transistor does not really "amplify" current but lets a small current control a large current. You still need to supply that large current in order to control it, so you cannot save ...
user107063's user avatar
  • 1,546
2 votes

What controls battery discharge? Can you use a transistor to lower the amount of battery capacity used?

You seem to be rather confused about basic electric concepts, so I advice you to get an entry-level textbook and study it (there's tons of freely downloadable material online too), otherwise you risk ...
Lorenzo Donati support Ukraine's user avatar
1 vote

Driving a 3x3 RGB LED matrix using programmable IC

3x3 matrix = 9 LEDs; 9 RGB LEDs, 9 x 3 = 27 individual control lines... what a mess! As you said, you are aware of the shift-registers and the like (e.g., latches). The constraints of your question (...
mguima's user avatar
  • 1,415
6 votes
Accepted

What controls battery discharge? Can you use a transistor to lower the amount of battery capacity used?

My idea was that I could use a transistor to boost the current so the battery wouldn't have to discharge as much of it's capacity This doesn't work because your idea, in effect is trying to magic ...
Andy aka's user avatar
  • 426k
1 vote

Zero Crossing Detector for Microcontroller

Your optocoupler is connected to the rectified and filtered DC output of the bridge rectifier, and it will never have a zero crossing. Put the opto and resistor on the 9 VAC input, and connect a diode ...
PStechPaul's user avatar
  • 6,644
2 votes

Is it possible to reprogram Megawin MG87FE52 IC?

From the datasheet it should be possible. The OEM has undoubtedly locked the memory (you'd only be able to wipe the entire memory) so you'd have to do it from scratch though, so perhaps it could be ...
Spehro Pefhany's user avatar
1 vote

Selection of ESD diodes

Fortunately a solution exists: the clamping voltage is not so strict as you imagine. Ideally, we would have clamping voltage precisely no more than the maximum rating of the device (for a USB ...
Tim Williams's user avatar
  • 17.7k
0 votes

Selection of ESD diodes

What you'll need is a TVS diode array, which is connected in parallel to those pins. The TVS diode is shunted to the ground. So that will take care of any ESD events.
kasijadi_lightnium's user avatar
3 votes

PIC12F675 uC overheating when controlling water pump via MOSFET

If the PIC12F675 uC overheats only when driving a switched load, the likely cause is CMOS latch-up. The path for a transient that triggers latch-up is not apparent from OP's schematic, especially ...
glen_geek's user avatar
  • 22.3k
1 vote

PIC12F675 uC overheating when controlling water pump via MOSFET

I suspect that you have made a mistake in the MOSFET's connections because as per the schematic, I do not see any reason why the uC will get heated. Re-check your MOSFET connections. The other point ...
sai's user avatar
  • 2,657
0 votes
Accepted

Selectable battery backup on a PCB

You can do this, but you need two MOSFETs. The battery is 9V (it doesn't show), the 40Hz signal is standing in for and IO from your uController. The P-Channel controls the flow of current from the ...
LordTeddy's user avatar
  • 1,650
0 votes

Selectable battery backup on a PCB

For that layout to work you need a P channel MOSFET and need to use a negative voltage on the gate to enable the battery. probably you should look for a different solution.
Jasen  Слава Україні's user avatar
2 votes

RMII to USB conversion IC

RMII is pretty networking-oriented, and on a pretty different logical level than USB. So, I think the easiest solution might be a USB network card controller. If you find one that allows for a ...
Marcus Müller's user avatar

Top 50 recent answers are included