New answers tagged

4

"Soft latch circuit" or "soft latch power switch" is the keyword for searching for circuits like this. You can find tens of IC's that do this sort of thing by googling "soft latch power switch IC"; many have programmable delays. I hate to recommend specific parts (cause shopping and buying recommendations are off-topic for this site), but I'll recommend ...


0

You can skip the FC-33 if you choose a DAC that has a current source output. There are many 4 - 20 mA output DACs on the market that can interface directly with a microcontroller such as your ATMEGA2560. The AD421 is one example. That regulator is also available in a 0 - 5 V input type.


1

At this point in time it doesnt really matter, while technical in nature you can consider this a marketing thing, a way to make motorola look better than intel, we have memory mapped I/O and a flat address space. Which kicked off a chain of events we still feel today. Addressing is addressing. 123 main street in smith town could be an apartment complex. ...


1

To add to what the previous answers have said. For the BOOT0/1 pins, it is usually handy to have them tied to a DIP switch or at least a push button to switch between GND and VCC. Especially since this seems to be a prototype for a project, it's better to have the ability to change boot states and not need to than the alternative.


1

A couple of things. First off I would add a reset switch, it comes in handy. Second, if you'll actually be using any of your analog(ADC/DAC/COMP), then I would go with a second regulator for VDDA and not just a ferrite bead. I would also add a 1uF cap to VDDA. Make sure you've got a storage cap where your power enters the board, 4.7uF to 10uF should ...


0

According to this the ADC input on A9 module supports 0~1.8V voltage. There is no AREF pin on the pinout diagram, which means the module uses 3.5~4.2V power supply to derive 1.8V reference internally. You have to supply stable power to voltage dividers and calculate fixed resistors so that when thermistor is at its highest resistance the voltage from the ...


1

Are you familar with what Aref even is? Either I misunderstand your question or we should explain the basics to begin with. An ADC is comparing the input voltage with a reference voltage and gives the proportion of this as a digital output: $$ADC-Code = \frac{V_{in}}{V_{ref}} * 2^{n-1} $$ , with n beeing the resolution of the ADC in bits. This reference ...


2

Why BOOT0 is set to boot from system memory? It means the bootloader, doing so does not allow you to boot your uploaded application. Set BOOT0 to low.


0

thank you for your answers. A possible way to solve the problem is with simple thresholds. If the ADC noise floor is below the expected useful resolution (in this base 6bits), then you can simply make sure that next sampled value stays within it. Basically, for every new conversion, you check that the 8bits sample is > (the old one +/- threshold) and if it's ...


5

If you want to store a byte in memory, you use a CPU instruction WRITE with two parameters: address and value. If you want to send a byte over UART (Serial), you need a way to write the byte somewhere. If the output register of UART is memory mapped, you will use the same WRITE instruction as to store to memory, but you will use an address which is not a ...


0

The DP83848 absolute maximum for input voltage is 4.2 + 0.5V = 4.7 V. The LPC1768 inputs are 5V-tolerant, and can withstand up to 5.5 V. I think your problem is located in the power supply design. You use two pi-filters, and this type of filters can be extremely dangerous on specific power level rise times, with the circuit oscillating up to 2x supplied ...


7

In memory mapped I/O the I/O register is selected at a memory address. To the CPU it looks just like a regular memory location. The advantage of this scheme is that no special instructions are required to perform I/O operations. Disadvantages are that the I/O registers take up space that could otherwise be used for RAM or ROM, and a lot of gates are required ...


1

1) There are always many ways to do things, no exception here. It is not a necessary context, either way is fine. It applies to both microcontrollers and microprocessors. Back in the mainframe days, a processor could have a memory channel and a IO channel for separate handling of peripherals. Peripherals usually have slower bus than memory so IO accesses can ...


1

3.3V for power. Line and Load regulation Tolerance of 3.3 V Ripple Output current - MCU and other peripherals Using GPIO pins to drive some LEDs LED currents GPIO rise time and fall time Pulse width PWM Frequency \$ V_{OH}\$, \$ V_{OL}\$ of the GPIOs and send some ports for sending UART, baud rate rise time, fall time ON time, OFF time \$ V_{...


1

For design validation: scope the heck out of it. Perform detailed signal characterization on any critical signals. Clocks can be especially troublesome, but for a self-contained MCU, you probably won't have any really high frequency clocks. Over-test for margin (without stressing anything too much). If your Vcc is +/- 10%, test at -15%. If your temperature ...


1

The scope of testing you take on for a pre-bought component focuses on looking for defects at the board level: opens, shorts, possible ESD damage. This would be done on every board. Typically this a combination of functional tests and some electrical parameter tests. How much you do of this depends on the expected defect rate of your components and the ...


2

What I want to do is to use this pot as a digital potentiometer with values from 0 to 63 (6bits) even though I am reading a 8bits value. That's a tough problem, and it's probably impossible to solve reliably without exploiting the fact that you can, in fact, change the voltage across the potentiometer. So, first of all, the 8-bit ADC is probably not the ...


1

It is a good idea to look for the datasheet of your relay and examine not only the recommended coil voltage but the current required to actuate the relay. Most microcontroller modules can only source/sink a limited amount of current on their digital I/O lines (usually on the order of tens of milliamps). Relays can sometimes require over 100mA of current on ...


0

I used an Alarm to generate a 1 hour sleep in STOP mode before automatically wake up to do some stuffs and then shut off. I configured 3 wake up conditions : 2 external interrupts The 59min timeout. Here is the source for a STM32F072. The source must be really close for your STM32F103: RTC_AlarmTypeDef sAlarm; GPIO_InitTypeDef GPIO_InitStruct; /* Enable ...


2

A 0.23 TOPs solution like you showed will have an inference latency of multiple hundreds of ms (a couple of frames per second.) This might be acceptable for a slow-moving RC car. Something faster will want higher throughput / lower latency. There are AI compute stick accelerator solutions that can work with a microcontroller over USB. Well-known ones ...


1

Thank you @Cisco25 for your time and help.. The problem in GPIO control was, when I flash hex file using atmel studio I selected invalid clock, the right setting is  "Ext Crystal/Resonator Medium Frequency with start-up time ("16 CK + 64ms").


1

I'll somehow extend Cristobol's answer. #1. More hardware, less software If you can spend 21 I/Os (assuming you want to simulate key presses on all the keys) you can use the CD4066 IC. It is an analog bilateral switch and each package includes four of these. You can connect every key's two contacts to one of those bilateral switches and activate the switch ...


3

You not only need a resistor but also a device to enable/disable it, a register to hold its configuration as well as circuitry to write/read that register. Also although resistors are simple they actually can take up a lot of die area and so usually a very small transistor is used instead - the actual value will vary greatly from device to device and over ...


0

A PLC as its called a Programmable Logic Control, it can be programmed with the help of Computer initially (Advance Programmers for some PLCs computer isn't even necessary for programming). once the PLC is programmed and its in run mode it doesn't need computer to be attached to it as it has its own processor. you need pc attached to PLC just for debugging ...


0

Well if you are lucky and what your switch is doing is grounding a pull-up resistor, you can get by with connecting the high V side to ground with your cable. If it's completing the circuit I don't know if you can do much


0

Connect an arduino GPIO directly to pin 6 of the 555, when configured as an input it will do nothing (allowing manual control via the button), but when configured as output (low or high) it will turn the 555 on or off. (then set it back to an input to allow the switch to work) if you need toggle action connect a different GPIO to pin 3 and write the ...


0

I would use+ power supplies from Meanwell, they have some that have 5v as an output and come with conformal coating, meaning that they are designed to be used for outdoors applications


1

Yes, you could possibly measure the Voltage and apply it to the corresponding Button, but: It's easier than you think: The black circles on the inner side of the Buttons are made out of conductive material, wich close the circuit on the PCB. You can exploit this by using some sort of "external Button" to activate a Button. You can see four conducting ...


2

Those inputs are probably matrixed, since I don't see any obvious ground traces. Matrixing means that you drive one side of some switches low, and read the other side to see which one is pressed, then drive some others low and read them with the same input lines. Matrixing allows this particular keypad to be read with 9 I/Os instead of 20, but it means ...


0

RT_SPIM_CS_NONE - Don't do anything with the chip select. You use this for erase bulk. But if you check datasheet p.114 figure 92, chip select must be asserted during bulk erase.


0

As per RSL10 datasheet: An Analog to Digital converter (ADC), accessed by the Arm Cortex−M3 processor. The ADC can read 4 external values (DIO[0]−DIO[3]), AOUT, VDDC, VBAT/2 and the ADC offset value. While the wording is a little bogus, you should be able to use AOUT as input to the SoC's ADC, which will read the voltage on AOUT. However I am not ...


0

Flash memory is block device. This means that minimal erasable unit is block. Block consists of several pages. Page is a minimal writable unit. It is impossible that erase command clear only lower bits of each entry. How you print data which is read from flash?


0

I haven't verified the mapping but I know that this line will cause you an issue: Button_Status_J6=digitalRead(Button_Status_J6); Here you are basically overwriting your mapping to digital pin 10, returning the result of the digitalRead into the variable Button_Status_J6, which will become either 0 or 1 on the first read. At the top of your code, you ...


0

I had a similar problem. During my tests, occasionally, I've got the timeout error in HAL_CAN_Start. The problem seems to go away after having increased CAN bus bitrate, originally I've tested on 10kb/s only. Hope it helps somebody.


0

You shouldn't need to use interrupts, pooling is a valid method for UART communication. Looking at your code the GPIO configuration seems off. The Tx pin is configured as Alternate Function but you didn't defined the function. Looking at @Bence answer you can see that pins uses af 7 for USART functions. I would suggest adding the following line before ...


2

Yes, Possible I have seen it personally the app developed for our production line. The datarate we wanted couldn't be achieved. But the communication as such was complete. Here is a useful link if you are starting with mobile app development for Android. https://developer.android.com/guide/topics/connectivity/nfc/nfc


2

Design first, code later. Plan everything out using logic, flow diagrams, state diagrams, etc. Your problems are with the logic, not the coding. Jonk has done 8051, I have not. I have done 6502 and 6800 assembly, these are similar. At first you might be tempted to have states based on physical position. But, an elevator really only has 3 states, going up, ...


1

Especially if you have a crystal-controlled UART at the other end, you are reasonably safe with as much as +/-5% error. However that error should include initial oscillator error, drift error (temperature, Vcc, time etc.) and any error in divider digital ratio.


2

I often use the ATtiny13 for little one-off projects that blink LEDs or control timing of external switches (theatrical props). Sometimes I just need them to change an IO pin at a given frequency and literally nothing else. The following is a quick and dirty way to toggle a GPIO using a delay. Note: this is not a timing-accurate nor recommended way to ...


1

No, because the UART stands for "asynchronous". You have somwhere in the datasheet a ratio baudrate vs sampling clock, so it is oversampled, then filtered (decimated). The asynchronous clock is reset once the start bit is detected, so there is plenty room for clock inequalities. For the standard oversampling ratio of 16 , the clocks can be off by +/-5.11% (...


1

OP oscillograph shows clipping of the bottom peak of the sinusoidal wave. This suggests that the internal buffer can only source current, and cannot sink current. A load resistor is required to pull the buffer output down. An internal pull-down resistor is included. From the data sheet spec, the 5k minimum pull-down resistor combined with \$V_{REFHI}\$ of +...


2

UART is very robust when it comes to clock accuracy requirements. This is a consequence of the fact that each byte is processed independently and any time difference associated to clock mismatch doesn't propagate for more than 10 bits (start bit + 8 data bits + stop bit) in time. This analysis from Maxim concludes that 2% in clock frequency mismatch is ...


1

Most microcontrollers have a dizzying array of counter-timer features, and it can certainly be tricky to set them up how you want them. The critical information is in chapter 11. 8-bit Timer/Counter0 with PWM of the ATTiny13 datasheet. The place to start is with table 11.8 where you want a mode which goes from BOTTOM (0) to a number you choose OCRA (modes ...


0

When you change channels the input section of the ADC requires a bit of time (depending on the source impedance and the difference between the previous and new voltages) for the reading to settle to the new value. Adding a delay or discarding the first reading of the new channel can mitigate that effect. Edit: To be useful, the delay would have to be ...


3

1) variable declaration. I have declare variable unsigned int Top_Display=0; if assign Top_Display=0123 display shows 0083 if assign Top_Display=123 display shows 0123 Some of the variable it take properly and some are not. if i assign value Top_Display=0129 it gives error digit is out of range. In C and many other programming languages, leading zero ...


1

The ADC has a built in capacitor at it's input. So, you should allow the capacitor to charge slowly to the actual value. If there is high resistance (LDR), it will take more time to charge. Since, you are switching the ADC to different channels, you should give sufficient time for the ADC sampling capacitor to charge. Provide sufficient delay after ...


0

A minor thing but I would suggest changing #define ldr 0 // assign LDR's pin to analog pin A0 #define light 8 // assign LED's pin to digital pin 8 #define lm19 2 // assign LM19's pin to analog pin A2 to #define ldr A0 // assign LDR's pin to analog pin A0 #define light 8 // assign LED's pin to digital pin 8 #define lm19 A2 // ...


0

Here 1234 variable used for timing application.Assume 1234 where 12 M and 34 Sec. Can some one suggest me how to do it. void main() { unsigned int min,sec,Top_Display=1234; min = Top_Display/100; sec = Top_Display%100; } // Assumptions: it willalways be a 4 digit number/valid number/


2

Is any of these options better from the point of view of signal integrity/EMC? Assuming your RGB signals are somewhere between 1.8V and 3.3V logic and given the fact there are single-ended signals, they will be prone to emission. If this is indeed on your concern list, I would recommend a couple of options which I've used in my past experiences: Use ...


2

A number of SPI slaves can be connected in one of two configurations: Single Slave-Select daisy-chained Here the entire SPI bus is treated as one big shift register and the master must know the order of devices in the bus chain and their respective register widths. It is also necessary to write all devices at the same time in the same bus transaction. ...


Top 50 recent answers are included