Questions tagged [code]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
44 views

Confusing terminology? [closed]

I posted this question at motor vehicle stack exchange but I believe it's more suited for this. I've noticed that many computer errors (diagnostic trouble codes PXXXX) in cars use confusing ...
Aden's user avatar
  • 27
0 votes
1 answer
95 views

Homemade BLDC controller not functioning (IR2101)

I’m trying to make a controller with 3 H bridges (N-FET, IR2101 and a Arduino Mega). I’m sure that the problem is in my code but I don’t know how to fix it. I think that the problem is in the PWM.The ...
Gustavo Carluccio's user avatar
0 votes
1 answer
32 views

Error while uploading hex file in DSPIC33CK32MC102

I am using DSPIC33CK32MC102 SSOP package, I have code and its hex file ready. I made the connections for the controller those are as follows: Pullup resistor of 5.5 kΩ for MCLR pin and 100 Ω between ...
user346235's user avatar
8 votes
1 answer
464 views

What does a gold band in the third position on a resistor with 5th band being white mean?

Any idea how I am supposed to interpret this component? I would not have expected a gold in third position for a resistor with 5 colors. Edit: this other thread gives explanation as to how to ...
SkiNoU's user avatar
  • 83
0 votes
0 answers
22 views

Plotting the radiation pattern of a half-wave dipole antenna with a frequency of 144 MHz in MATLAB

I need to plot the radiation pattern of a half-wave dipole antenna with a frequency of 144 Mhz in MATLAB but I don't know the code, can someone please help me?
Azl's user avatar
  • 1
1 vote
0 answers
31 views

NEC Wire Size for Neutral Question

I'm sorry if this is not the right place to ask this question. In my shop, I have a solid state phase converter that is creating three phase power for some of my machinery. It's fed by two 150 amp ...
Confundity's user avatar
0 votes
1 answer
109 views

Difference between firmware, bootloader, and the code memory

I am new to microcontrollers and am facing a problem regarding the understanding of the terms firmware, bootloader and the actual code of a microcontroller. In some places I have read that the ...
user avatar
0 votes
2 answers
84 views

What do the letters mean on this LiPo (or Li Ion) battery?

I’m trying to find a replacement battery for my Bluetooth earphone as they drain out very fast. It is a 3.7 V 55 mAh. Looking through the options I see batteries with better capacity but the letters ...
Tokuo Sorato's user avatar
0 votes
2 answers
102 views

Why is this variable not updated during the loop?

I`m trying to obtain a PWM signal from RA4 a PWM signal when a button is pressed (button connected to RA2) using a PIC12F1572. I'm in trouble with code because run as follow: Start simulation via ...
SkePsis's user avatar
  • 67
1 vote
1 answer
53 views

Help to identify a SOT23-5/SOT26 component

I'm looking for some help to identify a SOT23-5 component that has the marking code D72 on it. The chip is located on a Canon camera mother board. There are 4 chips with the same marking code. One of ...
nataf10's user avatar
  • 49
0 votes
1 answer
150 views

How can I switch from PWM output on an STM32 to logic 1 output?

I am generating PWM on the TIM1C3 channel of an STM32 Bluepill board. A switch is connected to the system and when the switch is in the set position, I want the PWM production of TIM1C3 to stop and ...
KlorenGazen's user avatar
0 votes
1 answer
155 views

Troubleshooting a ZCD TRIAC circuit

Can someone see what's wrong here? My 50 W LED light doesn't shine. Here is my code from the Arduino IDE: ...
Mickolini's user avatar
0 votes
1 answer
112 views

Using transceiver between DALI and microcontroller

Does anyone have experience using a transceiver between a microcontroller and DALI bus? Please see the attached wiring diagram. I am not sure what is wrong with the circuit, but when I measure the ...
Mickolini's user avatar
0 votes
0 answers
61 views

FreqCount.available() only returning false

I am a novice Arduino user trying to measure the frequency output of my HTF3228LF humidity sensor using the library FreqCount on my Arduino Teensy LC. My circuit connects the output of my sensor to a ...
Matthew Kozubov's user avatar
7 votes
1 answer
173 views

Aiken code- any actual (recent) use?

A search for Aiken code (2-4-2-1 binary coded decimal) yields many web pages and a video with a lecturer claiming (in virtually identical language- this is from Wikipedia) (emphasis added): The code ...
Spehro Pefhany's user avatar
2 votes
1 answer
309 views

How do I read multiple ADC channels from a SAMD21 configured in atmel.start?

I'm stuck with trying to read multiple ADC channels on a SAMD21 that I have configured using ATMEL.start. I am very new to Microchip Studio (Arduino convert trying to upgrade). The below code is my ...
IlluminatedDan's user avatar
3 votes
1 answer
182 views

What IC is this? SMD marked AARY

What is this IC? Where can I find a datsheet for it?
khalid.h's user avatar
3 votes
1 answer
90 views

Please help identify a step-up DC-DC converter IC

Thank you for the opportunity to share this with the community. I'm in the process of repairing the PCB inside the SkyWatcher. So far I have identified the blown chip as a dc-DC boost converter ...
dasdboot's user avatar
-2 votes
1 answer
95 views

Electronic Chess Board [closed]

I want to make a chess board that can detect where all of the pieces are and send this information to a computer (Chess.com). I looked into it, and it seems that the best way to do this would be with ...
Set's user avatar
  • 1
1 vote
0 answers
113 views

Pulse generation using Timer counter in ATMEL SAM3x8e Arduino Due

I am using the ATMEL SAM3x8e chip on an Arduino Due. I want to generate two pulses of frequency 100 kHz of the pattern shown below (1 period shown). For this I used TIOA8 and TIOA0 lines in the ...
SM32's user avatar
  • 366
1 vote
1 answer
139 views

PIC16F628A input not working

I am using PIC16F628A, MPLAB IDE to coding and Pickit3 to write the code into MCU. The code works on Proteus but does not in real world. I setted A0 pin as input. It should count up normally and count ...
akiftokel's user avatar
0 votes
0 answers
185 views

SSD1306 OLED display, howto: Set Display Start Line (40h~7Fh) in page addressing mode?

I'm trying to erase the display in Page mode addressing. Having understood Page and Columns like indicated in figure: 10.1, page 34 of the datasheet. But what is the correct "Set Display Start ...
NaturalDemon's user avatar
0 votes
0 answers
967 views

SOT 23-6 SMD marking code

Can anyone help me with a SOT 23-6 manufacturer's marking code? I have searched, but no joy. It is from a laptop inverter board.
Smittykoi 's user avatar
0 votes
1 answer
64 views

Battery level indicator doesn't work, what did I do wrong?

I am building a battery level indicator. I am using a Arduino Uno and a voltage sensor. I am currently trying to write the code for this project, but I always get 103.5%, regardless of what the ...
user avatar
0 votes
1 answer
139 views

ATMega328p with SSD1306 and DHT22, help in code

Hi I am trying to make a project that uses DHT22 (Temperature & Humidity Sensor) and SSD1306 (OLED Display) with the ATMega328p. I want the OLED Display to be normally off and should turn on for 5 ...
dracarys's user avatar
  • 121
0 votes
1 answer
123 views

Identify SMD devices 32P, s67, sEF and E5L, H4K, 1 9RL [closed]

I have searched for weeks on the internet but it seems SMD devices have no fixed rules- anyone can name any chip any number/letter! No result searching this forum either. I am trying to identify a few ...
Chris's user avatar
  • 11
2 votes
1 answer
119 views

PI controller ringing once deadband hit

I am controlling a power supply with a home-brewed PCB. The power supply has some weird drift, so I implemented a PI controller in software to reel it in, but the output voltage rings once the dead ...
thunderbootyclap's user avatar
1 vote
1 answer
211 views

Verilog code execution in gate level modeling

The following is Verilog code an SR latch. ...
PG1995's user avatar
  • 245
0 votes
1 answer
130 views

Hamming code question

Suppose we have m data bits and n parity bits. In order for the Hamming code to function: $$m+n<2^n-1$$ If we have 3 parity bits we can have up to 4 data bits. But lets say we don't have 4 data ...
Jun Seo-He's user avatar
0 votes
1 answer
4k views

Code protection (firmware security) in PI PICO RP2040?

What are the available code protection (firmware security) options for off chip flash in PI PICO RP2040 for industrial IP critical designs?
mmfloom's user avatar
  • 11
2 votes
1 answer
558 views

How to convert the ADC/PDB part code of Teensy 3.2 for Teensy 4.0

I was working on two thumb ECG device on Teensy 3.2 but Teensy 3.2 was out of stock everywhere, so I was having only option to buy Teensy 4.0, now I was having code for Teensy 3.2, the below code is ...
Rohit gupta's user avatar
4 votes
1 answer
181 views

Noob questions about my accelerometer (ADXL345) and Arduino components in general

I've just bought this accelerometer: https://www.amazon.co.uk/XTVTX-ADXL345-Digital-Acceleration-Gravity/dp/B09NRFDH5J/ref=cm_cr_arp_d_pl_foot_top?ie=UTF8 I've bought it to learn about accelerometers ...
user avatar
2 votes
1 answer
2k views

ESP32 PWM duty cycle measurement from input

I am trying to measure the duty cycle interval (from falling to rising edge) in microseconds of an incoming PWM signal of 20 KHz. I made a test PWM signal on a GPIO pin (50% duty) and connected it to ...
Ralfs Volis's user avatar
0 votes
1 answer
99 views

How to monitor your code execution written for any electronic device while they are operating?

I am working on a mobile robot that includes motors, proximity sensors, encoders, and MCU. I am powering my MCU CC1350 Launchpad using the onboard power supply. The IDE I am using is Energia IDE, ...
user274774's user avatar
1 vote
0 answers
77 views

What is wrong with this PIC16F877A HCSR04 example?

I am working on distance sensor with PIC16F877A. I am using MPLAB IDE AND XC8 compiler. My goal is to gradually turn on the right leds at certain distance levels. but the leds are blinking unstable. ...
Electronx's user avatar
  • 501
2 votes
2 answers
992 views

Identifying unique color code of non-inductive wire wound resistors: Weird resistor color coding, never seen before

Here we identify the color code determining the values of non-inductive wire wound resistors, specifically Yageo's NKN series (but applicable to other manufacturers of this class), which are a unique ...
parkside's user avatar
  • 775
2 votes
1 answer
1k views

Trouble using the UART with RPi Pico

I'm making a remote controlled machine using a pi pico to drive the motors and read some sensors, and a raspberry pi 4 to send commands to the pi pico via serial and host the web interface. I'm ...
lasb3tas's user avatar
  • 185
0 votes
2 answers
958 views

Is it possible to write a program that calculates its own energy usage?

If I have a program (e.g. a small Python program) on a specific machine. Would the program be able to measure how much energy its computation costed? I think, there would be two possible ways to go: A)...
Tho Re's user avatar
  • 101
3 votes
2 answers
209 views

AD5693 digital to analog converter

I am using an AD5693 as digital to analog converter with an Arduino Uno. I have connected the SDA andSCL pins of the AD5693 to the I2C pins of the Arduino Uno. I have connected the LDAC active low to ...
power machines's user avatar
-1 votes
1 answer
396 views

Can't get Arduino output to work using IRremote Arduino library

I'm trying to send an infrared signal to my LED-strip-receiver, but no code makes the LED work (light.) I have the IRremote.h Arduino library installed on version 1.18.15 and I found this example/test ...
David Grean's user avatar
0 votes
1 answer
54 views

How to use TA1 of P1.6 without also using it on P1.2 on MSP430F1101

I have been struggling for a lot of time now, training to use the pwm function on pin 1.6 of the microcontroller. For P1SEL=BIT2, it is correctly using TA1 on P1.2, but for P1SEL=BIT6 it is not using ...
Paul Schuldesz's user avatar
0 votes
0 answers
45 views

NFPA70E Question: My company provides electrical inspection services, does my technician need to wear a hot suit?

So my company provides preventative maintenance inspections, wherein the technician will open a large number of electrical panels, rated from 120-480 volts, sometimes up to 30 panelboards in a single ...
ElectricianPat's user avatar
2 votes
1 answer
143 views

Can't understand this PID code

I am having trouble understanding some PID code on an FPGA that is posted on github, by David Paquette. I will paste it in at the bottom of the post. It looks very compact and neat, and I understand ...
David777's user avatar
  • 1,548
0 votes
2 answers
553 views

I want to implement an Z transform Equation in C (with saturation limits)

I will start from the beginning . I had a PI controller with saturation limits (+4 and -2) whose Laplace equation is as follows (0.05s + 0.5)/s. Sampling time of 40 micro seconds Using Tustins method ...
ZOHAIB MIRZA's user avatar
0 votes
1 answer
278 views

STM32 - developing code without controller

Is it possible to develop a code for STM32 (hobbyist) without controller attached and test it? Is there a simulator mode or some other possibility? I do not have enough space to let the project "...
Divisadero's user avatar
2 votes
0 answers
48 views

add 2 buttons to this sketch

Can anyone tell me how to add 2 button switches to this sketch (one forward and one reverse) for a second motor?` This code works great and I would like to just add the some button switches to pins 4 ...
edrummer's user avatar
1 vote
1 answer
61 views

How can I make Verilog HDL ModelSim test bench for a simple ripple adder circuit output an addition table instead of a long list of every calculation?

I've completed my assignment and I'd like to make the output look something like this, with one table for sum output and one table for carry output: ...
Jake Nixon's user avatar
0 votes
1 answer
736 views

VHDL code for ALU and ROM connection

I need to connect an ALU with a two-port data memory, but I can only implement this far, and I don't know what is missing, plus I am a bit confused as to what to write for the testbench code ...
xxs899's user avatar
  • 23
0 votes
2 answers
559 views

ADS1115 differential measurements - resolution limited to 12 bits instead of 16 bits

I am trying to read a differential voltage with an ADS1115 (https://www.amazon.fr/gp/product/B07RJT3GHC/) hooked up to a Teensy 4.1. I am using Adafruit_ADS1015 library (https://github.com/adafruit/...
loulou's user avatar
  • 1
0 votes
0 answers
58 views

download code via SWD ADuCM3029

I made my own PCB using ADUCM30299 as microcontroller; in this card I also have a power management, BLE, Flash memory,USB Type C when I tried to calculate the voltage in SWD_CLK, SWD_DATA, .... I find ...
Safwen 's user avatar