Questions tagged [code]

173 questions
21
votes
3 answers

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 | |--------+--------+-----------+------------| | a | 00 | 100 | 000 | | b…
Winny
  • 321
  • 3
  • 9
18
votes
5 answers

How to visually tell the difference between axial inductors and common resistors?

Is there a simple way to tell axial inductors and resistors apart in through-hole type PCBs? I do find the color code on both very confusing. Is there an obvious difference that I am missing? As a beginner, I might just be overlooking something very…
user40963
  • 181
  • 1
  • 1
  • 3
11
votes
5 answers

What tools or standards can be used to improve embedded C code reliability?

I typically program PICs in C, usually for switched-mode converters. I've heard of various static analysis tools and standards like MISRA C that can be used to help improve the reliability of code. I'd like to know more. What standards or tools…
Stephen Collings
  • 17,933
  • 19
  • 103
  • 195
8
votes
4 answers

Is the Gray code unique?

After googling, I found that a Gray code is not unique and the only requirement for a sequence of binary strings to be a Gray code is that two adjacent binary strings differ by only one bit. Can we consider 010 → 110 → 100 → 000 to be a Gray code…
mendax1234
  • 168
  • 1
  • 9
8
votes
3 answers

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?
Ramesh
  • 195
  • 1
  • 5
8
votes
2 answers

Help understanding "unusually talked about" transistor code markings

I am a beginner trying to gain a better understanding of transistor codes. Before posting this, I searched the web looking for answers but I was unsuccessful. Please take a moment to look at the transistors picture below: Here are my questions:…
T555
  • 1,669
  • 3
  • 18
  • 30
8
votes
4 answers

My first STM32 code - please criticize me

I have just wrote my first code on STM32 - blinking LED. It combines a fragments from different sources; please criticize me so I can learn how to write proper code and don't learn stupid habits. #include "stm32f30x.h" void SysTick_Handler(void);…
Ekci
  • 177
  • 1
  • 4
  • 13
6
votes
1 answer

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 was developed by Howard Hathaway Aiken and is…
Spehro 'speff' Pefhany
  • 466,514
  • 24
  • 397
  • 1,047
6
votes
4 answers

How is digital data represented in analog waves?

This question is simply coming from an intrigued teenager, so if it has any flaws, I'm sorry for the inconvenience. To my knowledge, when digital data is transmitted wirelessly, it is first encoded into analog, whether it is Bluetooth, Wifi, etc, it…
6
votes
1 answer

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? Code A6530 72130 dimension is 6.6mm x 4mm
Lok
  • 171
  • 6
5
votes
2 answers

Converting PMSM motor differential equation to difference equation/discrete-time implementation

I am researching about sensorless control of PMSM, and currently looking at how to implement the algorithm into code. From this link Module 9: Position Observer (Part 2/2) . I encountered the equations shown below: How did the author come from above…
Dinh Thong
  • 73
  • 5
5
votes
1 answer

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 function?
David
  • 101
  • 4
4
votes
4 answers

How do you structure firmware drivers that can be shared across devices?

I have recently been doing a lot of small projects with microcontrollers. I have designed several boards that use an RP2040 combined with different selections of sensors. Through this process, I have created different libraries for talking to the…
TJM
  • 1,236
  • 3
  • 19
4
votes
1 answer

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 and practise them with my Arduino Uno. I have a…
user270727
4
votes
4 answers

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 instructions) and 3-stage pipeline (i.e., fetch, decode…
user105009
1
2 3
…
11 12