# Tag Info

## New answers tagged microcontroller

0

From your description I am guessing you are continuously polling the pushbutton to see if it has been pressed. There are really 4 modes (assuming you want to turn the display off); these are "LEFT LANE", "RIGHT LANE", "CLOSED LANE" and "DISPLAY OFF". Your code should look something like this: while (TRUE) { read ...

0

Put mode in a variable. Put the check for button in a function that also does the delay. Put the main loop around a switch statement that checks mode.

2

You don't have to be an expert in C. But it helps if you are, because sometimes in embedded systems things are done with slightly different mentality compared to how you would do it on PC. The C is still same, but you don't have a familiar OS running the code, as there is no OS at all, or there is some RTOS. Have a C reference at hand. But there is so many ...

1

You can (and i recommend you should) learn C along the way of developing. This will help you learn the parts of C that are important for developing in embedded systems. For example you may not need to learn classes (structs in C). Yes, learning how to write directly to registers will make you a better programmer. The hard part on that, is to find tutorials. ...

0

... four of them work fine and two show very unreliable behaviour. That means either: you have a mistake on two of the boards. your design is on the edge of not/working. When I detect metal object voltage at Zener diode (3.3V) is 0.70 V which is fine but when I connect microcontroller GPIO pin to read them voltage at same point (Zener diode 3.3 V) is 0....

1

Let the user select the options by binary code using three input pins. Table 1. Jumper options. Option J0 J1 J2 0 0 0 0 1 1 0 0 2 0 1 0 3 1 1 0 4 0 0 1 5 1 0 1 And you still have more if you ever need them. Other options include using an analog input. simulate this circuit &...

0

The Atmega328 has 32kbytes of Flash memory (program memory). The instructions in the AVR family are 16bits wide, so the flash memory is 32 bytes/2 =16 k words 16kwords= 16*1024 words=16384 memory locations from 0000-3FFF(16 bits wide)

2

Can the simple RC and MOSFET circuit be altered, so that the turn on Point can be precisely defined? (+- 50ms) Yes, but you will have to add a component that has more accurate threshold voltage. An op amp or comparator could be used with reference voltage set by a voltage divider, like this:- simulate this circuit – Schematic created using CircuitLab

0

It's not particularly easy to get an iron-clad guaranteed +/-10%-ish tolerance with a very simple circuit, even the timing capacitor alone will likely have a 5% or worse tolerance (especially if you count temperature, voltage coefficient and aging of a ceramic cap). If you have control of the firmware, it's far, far, far better to use another pin and have a ...

0

Utilise a MOSFET driver that can provide sufficient current to turn on the MOSFET in datasheet stated time, and along with a timer chip, this should work like a charm

1

The short answer is Yes. You will need to have the same GND potential for your measurement device and DUT. But you will need to be careful, as others commented, Since you mentioned power outlet, likely you mean the Mains. for correct measurement, it is not only the ground, but the Earth. when you don't have the same earth, you don't have the same "...

0

as you said, the CPU handles 200MB/s at a clock speed of 200MHz, that is assume a 8-bits bus clocked by 200MHz. the SDIO is 4 bits data bus, therefore at 208MHz SDR, it gives 104MB/s. in order for it to work, you will need to interface 4bits data bus from CPU to SDIO at a clock speed it can accept. It is OK your CPU runs interface clock speed at 200MHz if ...

0

I've decided to use an optocoupler for probing, so I don't need to connect both grounds.

0

If you only need to turn the heating on or off, you could use a 12V PTC Heater Cartridge. They are available in a range of temperatures, and self regulate at that temperature. They would likely be a safer solution, as you could prototype with a simple battery and switch combination, if necessary moving to a microcontroller once you had perfected the ...

1

That is an isolator with a high current (3A!) push-pull output stage. It can't be supplied with power through an 1k resistor. Move the resistor in series with the LED.

1

Since the multiplexers require both digital select and analog signals coming from the pots, place the multiplexers on the microcontroller board. Hence only analog signals pass through the IDC cable. Use more than one wire in the IDC cable for the ground so as to reduce common ground impedance and resulting cross-talk.

6

One problem with IDC cables is grounding and noise issues, they need to be accounted for or there could be problems with the design. IDC cables can have cross talk between conductors, so sending the digital signals over IDC could potentially bleed into the next pin if the signals are switching and create noise (I've had this happen before). With IDC, ...

0

As Lundin comments, please learn some basic electronics. Anyway, here is the most simple circuit. simulate this circuit – Schematic created using CircuitLab It is designed to divide the car voltage for a 3.3V Arduino. If you use a 5V Arduino it will work also, but you might lower R1 from 33k to 18k or 22k. The voltage divider follows this equation:  ...

8

After one day really hard challenging with the problem!! i finally figured out some important points that is i think worthy for other people out there so i decided to represent them: The STM32's DMA is a very quaint tool that i today realize that it can handle almost every kind of data transmission from a memory area to another memory area(such as moving ...

1

Bear in mind that the fan blades are shaped for optimum performance in one direction only. Reversing direction will result in more noise and less air flow.

2

Any stream can be used. No DMA request channel is used because the memory-to-memory transfer mode is selected and triggered in software.

5

You can select any stream you want (of course, DMA2 only). Channel selection is also irrelevant, because channels are related with requests. Notice the title of the Table 43, which is "DMA2 request mapping". Memory-to-memory transfers aren't triggered by DMA requests. Here is an example of Memory-to-memory transfer: #define MEMSIZE 32 uint16_t ...

1

For high reliability systems, you often want so have something like a "configuration mode". Either a dedicated button or one of the dip switch inputs. When this mode is set, and only then, read the dip-switch. Otherwise use stored settings. If the result read is different from what your MCU has stored in NVM, then write the read result to NVM. ...

1

As the resistive divider (or potmeter) is an important part of the feedback in this regulator, you cannot simply remove/replace it with something else as that would influence the feedback loop and the output voltage would not be regulated anymore. What is possible however is that pulling/pushing a DC current into the voltage divider at the point that is ...

3

Many microcontrollers have internal pullups (and sometimes pulldowns). Say you have the switch connected to short the inputs to ground and are using the internal pullups. After the switch is read you can change the GPIOs to outputs (which will typically turn the pullups off) and set the latch to low and either set them to push-pull outputs or open-drain ...

6

Everything here assumes the switches are connected between microcontroller pins and ground, so that a closed switch reads zero. Option 1: Drive all your pullup resistors from a microprocessor pin. This'll take an extra pin, but when you're done with it you can pull it low. Option 2: If you have a modern microcontroller, it has every kind of pull-up, pull-...

3

Use 1MOhm pull-up or pull-down resistors for low power. You only need one pin and on transistor to disconnect all pull resistors from the power supply. You may not even need a pin. I think you may be able to replace the transistor with a cap that automatically charges up to eventually prevent current flow. Just sample fast enough after power up before the ...

0

Ohm’s Law tells you it draws 3/0.25=12 A to start and transistor is far too small in power rating to handle cool operation. The current gain drops towards 10% of hFE as a switch so your base current is under-driven and Rce is 1.5 Ohms Try <50mOhm Nch 1V=Vth FET instead which is necessary. Your battery won’t last long either. If Base =0 Ohms you get ...

4

First misconception : Push-pull mode does not mean the weak pull-up and pull-down resistors are disabled. On some MCUs they can be, but this MCU has separate control for resistors and output mode. The resistors can be enabled even in push-pull mode, but it just makes no sense because the strong transistors can push or pull much stronger and will override the ...

3

The open-collector mode is commonly used to drive a signal that is shared by multiple drivers (such as your microcontroller and a temperature sensor). When neither device is driving the signal will be high because of the pullup resistor, but the NMOS transistors in both devices are capable of over driving the resistor and pulling the line low. So, either ...

2

Yes that’s correct. If you used open drain then you need a resistor to turn off the drain which is slower since it would be higher resistance than a 25~50 R CMOS driver when going for high speed low V with Ciss rising with reduction of RdsOn. Use the Push pull driver mode if they use the same voltage with Vt=~1V FETs. Use the Open Drain with a pull-up R=470 ...

-1

You can use Java on a Chip (JoC) is the programmable java microcontroller JoC has a reference Board called Javaino Also, Demmel iLCD product have Java VM on board, display with JVM

1

A host must provide 5V power supply to device. A host will wait for a device to appear before doing any communications to device. Host always initiates any communication. A device can use 5V for powering itself, or if it is self-powered, simply sense when host connection is made or disconnected. A device will always wait for communication from host. OTG ...

-1

Have you tried a more consistent voltage regulation like a LM2576 module instead of linearly regulated power source?

1

I think there is a contradiction between dspic33E Family ADC Reference manual and MCU dspic33EP512MU810 datasheet. I have attached an image below that correctly shows the SMPI bit details in ADxCON2 register. The image attached is the correct one and it can be found in MCU datasheet. and I have verified it with Microchip. FRM shows the wrong information. ...

5

I had the same issue, with the SMD version of the ESP, during prototyping. Since I started using ESD mats, and ESD gloves, I dont see my ESP's dying :-) What I observed as Stage 1 was random serial characters, and then within few hours, esp would be dead. No Flashing either! Obviously I was touching them with my bare hands, on a carpeted floor. I took 2-3 ...

1

Yes, you really do need a differential PWM signal if you want to use the differential pins (inputs 3-10) on the CGD1200HB2P-BM2. The Threshold voltage is shown in the Gate Driver Electrical Characterization: You need to have a differential voltage below -200mV and above -7V in order for the 0 to be detected.

2

There is a type of DRAM which includes an onboard refresh controller. It allows for large memory densities while allowing an MCU without a DRAM controller to treat it like an SRAM. It is called Pseudo SRAM, PSRAM, or Cellular DRAM by various vendors. An example example part number would be... Winbond W968D6DAGX7I, 256 M-bit, 133MHz, \$3.89 on Digikey.com ...

0

Back in the times of magnetic core memory, the core drivers and receivers had to be adjusted for the core temperature, or the core had to be kept at a fairly steady operating temperature. This was because the memory operated close to the physical limits imposed by its design. As a counterexample, the 6116 static RAM doesn't operate anywhere near where ...

0

Generally speaking, you need 3 things to place a variable in flash: Declare the variable as const. Declare the variable with static storage duration. That is, either at file scope and/or with static keyword. A "flash build" linker script in your IDE. It is common that embedded systems IDEs use a so-called "RAM build" during debugging, ...

1

I removed C1, which @Transistor pointed out was an AC potential divider - removed all the sinusoid. Thanks!

0

The answer to this question can be found at the following link to stackoverflow, where the same question was asked.

3

why does the Stm32f103c8t6 Board need an ST-Link V2? You do not "need" it but you "need" a way to write your program to the flash on the part. Well I am starting a course on embedded systems on udemy and it seems I need an M3 or M4 ARM cortex MCU so I can follow on the projects. The course itself recommend the Discovery board, but I was ...

1

If you want to use those generic boards, I think you should get an ST-LINK V2 or clone (the latter is inexpensive from China and the originals are not too expensive either) and a USB<->TTL serial module. STM32CubeIDE supports ST-LINK and Segger J-Link and I would not recommend the latter unless you have a big budget. I believe you could also use ...

0

The way in which I was able to resolve my problem was to select the correct bank for LATA, before attempting to read from it.

0

Voltage divider with input Hi-impedance amplifier (op-amp) would work. the previous suggestion of using AM26LV32 is OK solution. be aware the device is only 5V tolerant, and MAX input (absolute MAX) is 8V according to datasheet. you don't want exceed that spec.

1

Yes, declaring your array as const in C language will leave the data in program flash memory area and access it there on STM32 MCUs.

1

Every part of your program code is stored in flash on that microcontroller – that's the only programmable memory it has. It's up to your compiler and linker to either leave data that you don't modify if flash and read it at runtime directly from there when you use it, or to load it into RAM first and use it from there – if you modify that data structure at ...

2

Pin 5 (on/off control) can be directly controlled from a logic supply and you don't need to use a MOSFET. Drive (for instance) a logic voltage of 3.3 volts to deactivate the LM2596 or, drive 0 volts to activate the LM2596. You don't need a transistor. Pin 5 current is 15 μA maximum so it's not going to be a bother to any logic driver such as from an MCU. ...

3

The datasheet you quoted yourself has the answer for you. The LM2956 ON/OFF pin allows to be controlled by logic levels. There is no need for any extra transistors or resistors.

Top 50 recent answers are included