Questions tagged [code]

The tag has no usage guidance.

0
votes
0answers
35 views

Coding for conductivity measurement using Arduino and 16 bit ADC

I am using a 16 bit ADC (Adafruit) connected to Arduino UNO through I2C. When I use differential mode to measure water conductivity (I plug jumper wires into pins A0 and A1 on the ADC), my numbers are ...
0
votes
1answer
61 views

Where to begin with programming an audio interface driver?

I'm designing my own mic/line preamp (the analog portions) and would like to have it interface with a computer in a send-return fashion as well (like any typical audio interface). I've noticed that ...
0
votes
0answers
30 views

current control with Arduino code

I am pretty new at using Arduino and I do need such a controlling current curcit. But I dont know how to read the current level from serial monitor on Arduino IDE. What kind of code do I need in order ...
0
votes
2answers
62 views

Setting pins as output Code - micro-controller

So i am using the MSP432 and i am confused on how the code for setting pin to desired function works. so for example from the manual i have found that: ...
0
votes
2answers
88 views

8051 microcontroller problem to find execution time of part1 for a given code

For the below mentioned 8051 assembly code: Time elapse: MOV R0,#100 Part 1 \$ \quad \, \, \,\,\$ : MOV R1,#50 Part 2 \$ \quad \, \, \,\,\$ : MOV R2,#248 Part 3 \$ \quad \, \, \,\,...
0
votes
1answer
79 views

Wiring colour code/law on universal power supply

Is it legal to use brown and blue for live and neutral wires in equipment sold in the USA, which uses 110v? I was looking at a teardown of an ATX power supply and one of the photos (see below) showed ...
0
votes
1answer
45 views

Completing Gray Code Given Initial Part

I've been asked to complete the following 5 bit Gray code: I know how to generate a Gray code (create a mirror image, pad the original values with a 0 and the reflected part with a 1), but I'm not ...
0
votes
1answer
38 views

Built-in Timer Module HCS12

Why is it preferable to use the built-in timer module rather than using assembly language coding to create delay loops? I've gone through the entire "HCS12 Microcontroller and Embedded Systems" book,...
0
votes
1answer
43 views

Getting out of a pattern in Arduino IDE - Ultrasonic + Motors Using Arduino

I am doing my final-year project of an autonomous river cleaning robot. I seem to have a problem with my code.. For now, i want to read my Ultrasonic Sensors (HCSR-04) while getting my DC motors to ...
6
votes
1answer
2k views

Identify unknown SMD component code A6530 72130

I have a TTL to RS485 driver board and I am try identify one of the manufacturer part number from the board. Can anyone identify the SMD Code and manufacturer part number of the following device? ...
0
votes
1answer
83 views

Problem in blocking and non-blocking - verilog

I have this code and I am having a problem in the product output, any ideas? I've tried a lot and it doesn't work.
-1
votes
2answers
116 views

issue with booth multiplier VHDL code

I'm trying to build a 4-bit booth multiplier using VHDL. I don't know why but the process block is executed just once. The state does change from idle to busy then it doesn't work. ...
0
votes
2answers
157 views

How does programming code provide power to electronic circuits? [closed]

I've been thinking about a question and haven't been able to find an answer. The question is that: For instance, an Arduino has a 5V output pin to feed any electronic component. When you code ...
-1
votes
1answer
644 views

SMD diode part number from marking code [duplicate]

I can't find SMD diode part no from Marking code,pls suggest if possible.
-2
votes
1answer
169 views

SRF05 | PIC16F18875

I´m doing a project for my electronics class. I´m trying to calculate a distance using a SRF- 05 Ultrasonic Sensor; but the result in the display is 0 . I´m using a Curiosity HPC Development Board w/ ...
0
votes
1answer
65 views

Debugging initialization of LCD with S6D05A1 driver

I'm trying to get this 320 x 480 LCD going through SPI (4 wire 8bit) for a while now but no luck. It seems like the resolution is not defined as should during init but I can't see how. Here what I ...
0
votes
1answer
748 views

BMP280 sensor (i2c) and c library

I'm writing software (for ATMega32) that reads pressure from Bosch BMP280 sensor. I'm using I2C bus. I have found this library: https://github.com/BoschSensortec/BMP280_driver and I have a question ...
0
votes
3answers
252 views

Bitwise operators: Whats the difference ^= vs &= ~(smthg)?

I'm coding for microcontrollers and I've come across two styles of bitwise operations that quite confuse me a lot because they are used interchangeably. First let's assume our REGISTER has 4 bits; bit ...
0
votes
1answer
41 views

How to receive audio from Arduino into Max [closed]

I'm a beginner with Max and what I'm trying to do is take the the audio input signal going into my Arduino and hear the receiving audio playing through Max. There's a photo below of the patch that I'm ...
0
votes
1answer
109 views

4bit demultiplexer with address entries in the EXCESS-3 code

My question is: how to make truth table for inputs on E3? There is only space for 2 bits, and E3 is written on 4 bits as I saw. Should I add more inputs for this situation or do this in different way?
0
votes
1answer
160 views

I'm writing a simple verilog code, having little trouble

In the image shown below, there says a syntax error at line 10. Its a basic If statement, i dont know why the syntax error shows up. Please advise
2
votes
1answer
647 views

Generate hamming code-words with given minimum distance

My understanding of hamming code (adding this as it might help someone in future): Description: Hamming code is basically an extended parity check code. Message is divided into blocks, and multiple ...
0
votes
1answer
34 views

Is a cross-correlation property of Gold code independent to modulation?

Gold code is known to have a good cross-corrleation property, i.e., a high cross-correlation value shows iff two sequences are the same. I wonder whether it is independent to modulation, e.g., BPSK, ...
3
votes
1answer
136 views

Errors in microcontroller delay routine

I have an issue with a delay routine that I am writing for use on a PIC32, the PIC32MX664F128H in particular. I have two separate delay functions, which use the same lower-level delay routine: one ...
3
votes
4answers
2k views

How is the code written in ARM7 compatible with ARM9?

I'm studying ARM families, In the above image, it is written that the code by supported ARM7 can be migrated to ARM9 and others. ARM7 uses the Von-Neumann architecture (single bus for data and ...
8
votes
3answers
3k views

Why is the Gray code called a cyclic code?

I understand why it is called reflexive and a unit distance code. I don't see any cyclic pattern which is repeating in the code. Why is it called a cyclic code?
-2
votes
1answer
442 views

Please Help me with this PSpice CODE CIRCUIT [closed]

I have a circuit to implement in PSpice, but I am completely newbie. Can you help me with it ? Here is the picture of it. I have to make an AC analysis, with a a signal source of 100mV with the ...
0
votes
1answer
716 views

Custom code on a calculator

I have got this old Casio fx-92B calculator I am not using any more. I opened it up and found this: I am not an electrical engineer. Is there a possibility of tweaking this board to make it run ...
1
vote
1answer
285 views

12V Stepper Motor not working - vibrates but doesnt spin

I'm working on a project and unfortunately my DC motor is not working. I wired it like this, am using a brand-new motor (SP BN2A in this document, I scavenged it from a bidet I had at home), powering ...
0
votes
1answer
267 views

VHDL Style Checker / Check Style

Is there a style checker for VHDL? I found style guidelines, but I didn't find anything like check style. Thanks in advance!
1
vote
1answer
70 views

Code protection in External flash

I am implementing external code execution for STM32F765VG with NOR flash (8/16 bit). The idea is to execute code from external flash memory. are there any ways to protect my code present in external ...
0
votes
1answer
203 views

Calculating receiver signal in CDMA

I am struggling to understand how the receiver is able to differentiate between multiple CDMA users, who are transmitting at the same time. In this figure for example, I understand each part, except ...
0
votes
2answers
2k views

Tantalum Cap Code Explained

I need to replace the following cap: It was placed at the input of a device that runs off 24Vdc, like the following schematic. simulate this circuit – Schematic created using CircuitLab I'm ...
0
votes
1answer
141 views

Gray Code Conversion

I'm aware that in Gray code the successive numbers will differ only by one bit. However I'm not able to proceed further.
20
votes
3answers
5k views

What is a Patty Code?

In my digital logic lecture today, my professor introduced a symbol code called Patty Code. I copied this table off the whiteboard: | Symbol | Binary | Odd Patty | Even Patty | |--------+---...
0
votes
1answer
121 views

What does it mean code for TFT LCD rgb?

What does it mean code for TFT LCD rgb? i dont know ("%s") or ("\x12" "kwh") or "%4u:%02U:%02u" ?
0
votes
4answers
1k views

Code Optimization of IF Statements?

Considering the design limitation of hardware (clock speed, memory, etc…), is there any better way to write IF statements more efficiently in C language (e.g. run on Arduino), more specifically the ...
0
votes
1answer
521 views

How do I generate the described pulse signal in Matlab (Simulink)?

I want to implement the following signal: I(t) = 500*(sin(pi.t/0.3))^2, t belongs {0,Ts} = 0, t belongs {Ts,T} Here, T = 0.8 and Ts = 0.3 The code I tried: ...
0
votes
2answers
1k views

Extra I2C on stm32f

I am using stm32f105 to control 5 I2C buses and some other peripheral circuits. The problem is that I used all dedicated I2C pins by other peripheral circuits. Is it possible I change a GPIO (General ...
0
votes
1answer
47 views

AYTINYx4 - execute other code during analog conversion

I am using an ATTINY44 in my current project. As I need to do some time sensitive switching I would like to avoid any unnecessary delay. To control another device (not time sensitive) I need to read ...
1
vote
3answers
460 views

Arduino code - Why do we need to read the rising edge?

I'm having a difficult time figuring out why we need to read the rising edge instead of using both edges. We are doing a school lab using interrupts in Arduino code, and I understand that we need ...
5
votes
1answer
339 views

What component has the reference designator RY?

I found a component designated RY8015 which I don't recognize, shown on the photo below on an LCD TV PCB (the bulb-like part next to a green radial varistor). What is it called? What is its design ...
0
votes
1answer
369 views

Do I need to use the 'add' function in mips to store into a variable or can I store into a variable with load word?

The following problems deal with translating from C to MIPS. Assume that the variables f,g,h,i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address ...
0
votes
2answers
179 views

Verilog code question

I'm new in Verilog and I need to create a module that when Entry=1, it will increment 5'b000100 in the "Money" output. This is the code that I made, but it's not working properly. The program it's ...
1
vote
2answers
368 views

Understand VHDL Code

I've been learning VHDL coding for the past two weeks to be able to understand the VHDL code of what I'll be working on. In other words, I'm still a beginner and I need help understanding some codes ...
0
votes
1answer
900 views

RTOS: Micrium uCOS vs Mentor Graphics Nucleus

We're working on a wearable IoT device, and I'm hoping for some guidance on the common commercially available RTOS, such as what's the difference between the two. As of current I'm leaning toward ...
1
vote
2answers
1k views

Electrical schematics component ID's

Is there a list of standard ID codes used for components on a schematic drawing that anyone can point to? e.g. K = Contactor S = Switch Y = Solenoid X = Terminal strip etc. Any list would be ...
0
votes
2answers
50 views

Most efficient way to switch order in which data is read in assembly

I have an assembly assignment that requires me to be able to store a number and via a lookup table output the number on a 7 seg display in both forward and reverse order depending on the state of an ...
1
vote
0answers
449 views

can't change LEDs states using PCA9685

I have a PCA9685 IC connected to i2c of cubieboard like board. Also OE pin is connected to one GPIO pin. I'm using ic2tools to communicate with PCA9685, I can read/...
2
votes
2answers
4k views

Difference between Blocking and Non-Blocking assignment in VHDL

I started reading about Blocking and Non-bocking assignment with reference to verilog. But when I switched to VHDL its confusing. What I felt is, in VHDL other than to visually differentiate ...