hybridfree/eevblog-posts huggingface dataset:
CH32V003 -A3 (SOP16) issue with SWIO (D1) and D4 - Page 1
Forum section: electronics / general

author: rhodges
author_rank: Frequent Contributor
timestamp: August 05, 2024, 04:28:17 pm
content: I have been using the CH32V003 -A4 (SOP16) part for various projects and today I got bit.I was using some GPIO pins and my scope to dig out some bug, and eventually I put a fast signal on D4. When I went to program a new image, it failed. In different ways. Some times, wlink said there was no part, sometimes it said it was the wrong part, and a couple others. Did I accidentally brick my CPU?Something tickled my brain, and I noted that on the -A4 part, D4 and D1 (SWIO) are next to each other. I seem to remember some errata on some other part (probably STM32) where there was the possibility of crosstalk between two pins. I don't remember it well, but the workaround may have been to make them both outputs.So with some hope, I thought maybe helping SWIO with a resistor might quiet it down. Assuming that is the problem, which I did not know, I just suspected. A 1K resistor to ground did not help. Then to VDD. Bingo! I was able to program it normally.My personal errata now includes "Be careful about how to use D4 on that part. Input might be fine. Slow or occasional output might be fine. But don't put a fast and continuous signal out D4."

author: zilp
author_rank: Frequent Contributor
timestamp: August 05, 2024, 08:37:59 pm
content: Quote from: rhodges on August 05, 2024, 04:28:17 pmWell, SWIO is an open collector interface that is pulled down by the MCU to transmit, so it makes sense that pull-up is the way to go. Though I am surprised that the programming adapter doesn't provide sufficiently low-impedance pull-up to enable reliable programming. A pull-up in the circuit makes sense in any case, though, to make sure that noise can't accidentally command the debugging interface to do weird things.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: August 06, 2024, 01:21:40 am
content: Quote from: zilp on August 05, 2024, 08:37:59 pmThe WCH-LinkE programmer does actually feature a 1k pull-up on the SWIO line, but the other side of the resistor is connected to another GPIO pin (PC6) of the programmer MCU. I suppose this is so that it is switchable, and I would guess so that it can be turned off when the programmer is operating in SWD/JTAG mode.Maybe there is a bug in the programmer firmware and this external 1k pull-up is not being enabled, leaving only the internal pull-up?
icatch V35MA-HH21 Soc Camera chips 'Ali-specials' - Page 1
Forum section: electronics / general

author: JimboJack
author_rank: Regular Contributor
timestamp: August 15, 2024, 12:50:31 am
content: Hi,I wonder if anyone has any datasheets/SDK/BOM on there V35MA-HHM21 Soc chip have an old HD camera of theres and wondering if i could go about seeing what under the hood.thksJames
heat calculation - Page 1
Forum section: electronics / general

author: windijon
author_rank: Newbie
timestamp: August 03, 2024, 12:01:16 pm
content: Hi!How can I calculate the produced head if I have a 6 V & 3 A input to a battery charger chip which converts it to a 4.2 V and 0.5 A output?

author: windijon
author_rank: Newbie
timestamp: August 03, 2024, 12:02:09 pm
content: Hi!How can I calculate the produced head if I have a 6 V & 3 A input to a battery charger chip which converts it to a 4.2 V and 0.5 A output?

author: tunk
author_rank: Super Contributor
timestamp: August 03, 2024, 12:10:13 pm
content: Please don't double post.If it's a linear charger chip: (6-3)*0.5=1.5WIf not, look at the datasheet.

author: tggzzz
author_rank: Super Contributor
timestamp: August 03, 2024, 12:12:04 pm
content: Quote from: windijon on August 03, 2024, 12:02:09 pmIt depends on which "heat" you want to include/exclude from that calculation.Pin=Vin*IinPout=Vout*IoutPpsu=Pin-PoutIf you want to calculate the temperature, you have to know the ambient temperature, the thermal conductivity between the power source(s), and the thermal conductivity.https://en.wikipedia.org/wiki/Thermal_conductivity_and_resistivity

author: PGPG
author_rank: Frequent Contributor
timestamp: August 04, 2024, 12:05:22 am
content: What does it mean that you have 6V & 3A at input?Do you have 6V source and you measured that your charger takes 3A from it?If yes than your charger takes 6x3=18W from power source and outputs 4.2x0.5=2.1W dissipating in charger 18W-2.1W=15.9W. Its efficiency is 2.1/18 = 12%.But I suppose that you simply don't know the input current of your charger so you can't calculate power dissipated in it.Assuming that 3A is not measured current but 6V source limit current and that your charger takes 0A for its own purposes and it is linear you get that as your charger outputs 0.5A than it also takes 0.5A.With such assumptions input power is 6x0.5=3W and output is like previously 2.1W so lost in charger power is 3-2.1=0.9W.But to get true result you need to know input current.

author: Halcyon
author_rank: Unknown
timestamp: August 04, 2024, 12:32:25 am
content: Duplicate posts merged.
STM8S103 ETR not counting - Page 1
Forum section: electronics / general

author: Sajeev
author_rank: Contributor
timestamp: August 02, 2024, 05:25:18 pm
content: Dear Forum members,I tried to count an external square wave on ETR pin PD3 using external clock mode2 on STM8S103F3 chip. The timer1 counter always show 0. I followed the RM0016 manual to set up the external clock 2 but was unsuccessful. If any members have successfully counted using ETR as external clock kindly advice. below is the code I used. The LED never light up or toggle as the counter is not counting, Any help is appreciatedSajeevmov CLK_CKDIVR,#$0 ; set max internal clock 16mhzbset TIM1_ETR,#6 ; External clock mode 2 enabledbset TIM1_CR1,#0 ; enable timer1bset PD_DDR,#4 ; enable output on PD4bset PD_ODR,#4 ; set port highread:ld a,TIM1_CNTRH ; reach here if counter reached 0, load A timer1 counter MSBld captureH,a ; store in captureHld a,TIM1_CNTRL ; load A timer1 counter LSBld captureL,a ; store in captureLldw X, caoptureH ; load word from captureH to index register Xcpw X,#$FFFF ; compare count to 65535jrne read ; if x not equal to 65535 loop back to label readbcpl PD_ODR,#4 ; toggle PD4 as X matches 65535clrw X ; clear Xldw captureH,X ; clear capture variablejp read ; loop againjp readProcedure as per manualExternal clock source mode 2Use the following procedure to configure the up-counter and, for example, to count onceevery two rising edges on the ETR:1.As no filter is needed in this example, write ETF[3:0] = 0000 in the TIM1_ETR register.2. Set the prescaler by writing ETPS[1:0] = 01 in the TIM1_ETR register.3. Select rising edge detection on the ETR pin by writing ETP = 0 in the TIM1_ETR register.4. Enable external clock mode 2 by writing ECE = 1 in the TIM1_ETR register.5. Enable the counter by writing CEN = 1 in the TIM1_CR1 register.The counter counts once every two ETR rising edges.

author: rhodges
author_rank: Frequent Contributor
timestamp: August 02, 2024, 07:41:44 pm
content: My datasheet shows D3 as the ADC external trigger. Timer1 uses B3, but the -F3 part does not have B3. The -K3 part (32 pin) does have B3.

author: Sajeev
author_rank: Contributor
timestamp: August 03, 2024, 04:16:11 am
content: Dear Sir rhodges,Thanks for the reply. I think you are right . I am using TSOP20 version of the chip which dosnt show B3(tim1_etr) in its pinout . The STM8S103K3 UFQFPN32/LQFP32/SDIP32 pinout and pindescription shows the TIM1_ETR as PB3 where as the STM8S103F2/F3 TSSOP20/SO20/UFQFPN20 pinout and pin description shows PD3 as ADC_ETR and PB4 with ADC_ETR as alternate function. The ADC_ETR seems to be different from TIM1_ETR. This version might not be having the TIM1_ETR. I was connceting to ADC_ETR pin PD3 and not getting any response. The external clock mode1 works fine on enabling the AFRO 0. Its sad that this was not mentioned in the data sheet. I lost 2 days digging. Thankyou one again.RegardsSajeev
ETR not counting STM8S103 - Page 1
Forum section: electronics / general

author: Sajeev
author_rank: Contributor
timestamp: August 02, 2024, 04:57:59 pm
content: Dear Forum members,I tried to count an external square wave on ETR pin PD3 using external clock mode2 on STM8S103F3 chip. The timer1 counter always show 0. I followed the RM0016 manual to set up the external clock 2 but was unsuccessful. If any members have successfully counted using ETR as external clock kindly advice. below is the code I usedmov CLK_CKDIVR,#$0 ; set max internal clock 16mhzbset TIM1_ETR,#6 ; External clock mode 2 enabledbset TIM1_CR1,#0 ; enable timer1

author: pcprogrammer
author_rank: Super Contributor
timestamp: August 02, 2024, 06:59:47 pm
content: Please do not double post the same question.For others see the more extended second post the OP made.https://www.eevblog.com/forum/microcontrollers/stm8s103-etr-not-counting/?topicseen
reading flash content of GD32F407zgt6 - Page 1
Forum section: electronics / general

author: Greg J
author_rank: Regular Contributor
timestamp: August 02, 2024, 11:58:04 am
content: I got a chinese made device , with GD32F407zgt6 on board.It's got port that's labelled OSBDM(1) on the PCB and a reset switch next to it.This port has all JTAG pins of the uC exposed:OSBDM1 connector on boardtop row: PA14/SWCLK, PA13/SWDIO, PA15/JDTI, NRST/RESET(also button next to the socket), VDDAbottom row: GND, GND, PB3/JDTO, NC, VDDI never delt with GD devices, it seems like an ST knockoff.I got STLink , and some other hacking tools. Pretty sure they didn't bother to protect it using fuses etc. Firmware can be updated via USB.How would you suggest I go about extracting the firmware ?Hydrabus, stlink, other means?Please help

author: peter-h
author_rank: Super Contributor
timestamp: August 02, 2024, 01:06:23 pm
content: Maybe this chip?https://www.eevblog.com/forum/microcontrollers/opinions-on-st-32f407vgt6-versus-gigadevice-gd32f407vgt6/It copies flash to ram at startup and runs code from ram, but ST tools like STLINK ought to be able to read the flash, if not protected?QuoteYou can still do that even with L2 protection enabled, because internal code can write the cpu flash. Obviously the firmware would be crypto protected...

author: Greg J
author_rank: Regular Contributor
timestamp: August 02, 2024, 02:35:25 pm
content: Firmware files are not encrypted. I can see strings in them.Can I read flash content using ARM SWD? or does that need full blown jtag?

author: peter-h
author_rank: Super Contributor
timestamp: August 02, 2024, 02:46:27 pm
content: SWD is STM's version of JTAG.

author: eutectique
author_rank: Frequent Contributor
timestamp: August 02, 2024, 05:05:02 pm
content: Quote from: peter-h on August 02, 2024, 02:46:27 pmTechnically speaking, it is not.https://developer.arm.com/documentation/101636/0100/Debug-and-Trace/JTAG-SWD-Interface
Struggling to understand RGB interface porch settings - Page 1
Forum section: electronics / general

author: Arte
author_rank: Contributor
timestamp: August 06, 2024, 11:36:52 pm
content: Hello, I'm trying to interface a LCD-TFT driven by a ST7789V to a STM32H7.I'm struggling specifically to understand how porches work, and whose responsability they are.The 6 'porch' variables in an RGB interface are the sync width, front porch and back porch for both horizontal and vertical. These 6 can be individually set in the LTDC configuration of the STM32.Going by the ST7789V datasheet giving you a table with min, typical and max values and little more information except the consequence of porch values on frame rate, it looks like you get to pick them (?).But then the available commands don't seem to let you set all of them. You can set the (hsync width + hsync back porch) and (vsync width + vsync back porch), " front porch setting" and " back porch setting" - only 4 values.As far as I can tell, all the relevant info is in the subsequent pages. It's not clear at all to me what " front porch setting" and " back porch setting" mean, considering that the ST7789V advises very different values for their horizontal & vertical front porch, for instance.There is a "separate porch control" option, on which there's no info, but I would tend to believe this enables different porch settings in idle & partial display modes rather than enabling setting different horizontal & vertical front porch - because there's no command to do that anyway.Could someone familiar with the RGB interface enlighten me ?These are the 3 relevant excerpts from the ST7789V datasheet:And this is the STM32CubeIDE configurator on the topic:

author: Silenos
author_rank: Regular Contributor
timestamp: August 07, 2024, 09:01:57 am
content: Have you read AN4861? I used that years ago and it was enough to set this peripheral to work.IIRC I was using "typical" values everywhere. Though my display was strange, like it was a piece cut from a larger sheet, and had to manually palpate the offset to align the porches(?) to fit into hardware display.

author: pcprogrammer
author_rank: Super Contributor
timestamp: August 07, 2024, 10:00:36 am
content: There is a lot to do with this, but it basically depends on the timing for the display. Setting the parameters wrong results in a shift of the pixels on the display. The settings to be used should be given in the specifications of the used display. The first image in your post already shows it all. (8.9.3)The sync pulse width plus the back porch set the start of the displayable pixels and at the end there is time needed and this is set by the front porch. Having these settings wrong results in either a shifted or distorted image on the screen.I have seen this with the FNIRSI 1013D and 1014D oscilloscopes that are made in batches where LCD's from different manufacturers have been used.So try to find the specs for the display you are using or see if it is possible to read out some information about this from the ST7789V, because my guess is that it is preprogrammed in that controller. Have not read the datasheet of it though, so it is a guess.
STM32CubeIDE lets board run with old code a first time before uploading new code - Page 1
Forum section: electronics / general

author: Arte
author_rank: Contributor
timestamp: August 01, 2024, 07:56:43 pm
content: Dear people of EEVblog, I stand before you as a man quite mad at STM32CubeIDE.For the last few hours, I've been struggling to debug stuff by using an oscilloscope in trigger mode connected to a custom STM32 board I'd connect via a STLinkV2 (clone). It eventually became clear that every time I'd press run, what would appear on the oscilloscope would be the result of the old code, before the changes prior to my pressing run.After a great moment of confusion I've realized that when you press run, the IDE/programmer resets the board...lets it run, THENresets it again to upload the new code, and run that.It is on the code after the first reset of the board, but before the upload of the new code, that my oscillo would trigger on.What can I do about this, if anything ? I can Debug the board instead and only turn on the oscillo trigger once the initial breakpoint is reached, but that is quite annoying, I wish this extra step wasn't there (and I might not be able to do that with Release code). Is there a IDE side workaround (to hold the board in reset until the code is uploaded.. as it should) ?Thank you.
How to identify MCU by it's pinout? - Page 1
Forum section: electronics / general

author: Finderbinder
author_rank: Regular Contributor
timestamp: April 24, 2024, 06:54:31 pm
content: Does any mcu finder exist which is able to sort out a potential candidates?Or short question: does substitute mcu exist for this Holychip HC89F0541 (LQFP32/QFN32)?https://crossic.com/wp-content/uploads/2022/10/HC89F0541_0531_Datasheet_Ver1.01_en.pdf

author: wraper
author_rank: Unknown
timestamp: April 24, 2024, 07:10:25 pm
content: Why? It's readily available in many places in China, including aliexpress. There is a chance code could be compatible with something else depending on what peripherals it uses as MCU is based on 8051 core. Very unlikely that there is a direct substitute though.

author: Finderbinder
author_rank: Regular Contributor
timestamp: April 24, 2024, 07:19:22 pm
content: The actual mcu is burned out. I think of using some popular mcu to program it with recreated firmware.I'm not sure that chinese mcu is compatible with my programmers, compilers.

author: wraper
author_rank: Unknown
timestamp: April 24, 2024, 07:28:17 pm
content: It's certainly compatible with any 8051 compiler, it has JTAG so probably you don't need to buy a specific programmer/debugger.

author: coromonadalix
author_rank: Super Contributor
timestamp: April 25, 2024, 10:10:37 am
content: seems enhanced 8051 family ... and i think STC does it too ??

author: ColinB
author_rank: Contributor
timestamp: April 25, 2024, 07:44:11 pm
content: It seems unlikely to me you'll find another microcontroller with the same pinout, I don't think this one is standard. But maybe there's one.What I'd do, is use whatever MCU you want that is suitable (i.e. compatible voltage/clocking/IO features) and then either:1. make a PCB module containing the new MCU, that fits the existing footprint, or2. dead-bug/point to point wire the new MCU to the old footprint

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 25, 2024, 08:10:10 pm
content: Quote from: Finderbinder on April 24, 2024, 07:19:22 pmHow complex is the firmware ?You can buy Holychip development tools, like thishttps://www.chipsmall.com/Products/HC-LINK-HC89F0541-Demo-HC-PM51_Shanghai-Holychip-E_20059201.htmland this link from their home pagehttps://item.taobao.com/item.htm?spm=a2oq0.12575281.0.0.4ace1deb5QqLDZ&ft=t&id=607238005144

author: Finderbinder
author_rank: Regular Contributor
timestamp: July 23, 2024, 08:09:15 pm
content: Quote from: PCB.Wiz on April 25, 2024, 08:10:10 pmI have bought HC-Link V4 programmer. I also got the second working device (power bank) ATZpower ATZ1000AEU PYS-PEP-E01000. Tried to copy dump from a working mcu with no successSurely it is password protected (8 symbol hex format). New mcu can be read/write.Any clue how to find out that password?
Beginners EPROM question - Page 1
Forum section: electronics / general

author: veedub565
author_rank: Frequent Contributor
timestamp: June 30, 2023, 03:32:18 pm
content: I posted previously about getting some EPROM chips programmed, see thread herehttps://www.eevblog.com/forum/microcontrollers/uvprom/msg4856921/#msg4856921I was able to get them programmed professionally at a very reasonable price, but there is a problem and I thought it best to create a new thread.There are 4 .bin files on 4 EPROM chips, and they contain the firmware for a piece of HP Test equipment (8341B). The original firmware was 1988, and the new .bin files are the updated 1992 firmware. It should just be a straight swap, program some EPROM's with the 1992 firmware and swap out the originals.... only it hasn't worked, the instrument won't boot at all and I had to put the old chips back in with the original firmware on.I realise this isn't a test equipment or repair section of the forum, but my question is... would changing the .bin filename have any effect on the data programmed into the EPROM ?original filenames were8340BU34,TITMS27PC256-2Rev19928340BU35,TITMS27PC256-2Rev19928340BU36,TITMS27PC256-2Rev19928340BU37,TITMS27PC256-2Rev1992And to make things a bit simpler I renamed them toU34U35U36U37And I'm just wondering now if doing that has caused it not to work. I don't really know enough about programming EPROMS to know if it could or not.**edit** just incase anyone notices the instrument is 8341b, and the .bin files say 8340b. It's the same firmware for both so thats not the problem.

author: RoGeorge
author_rank: Super Contributor
timestamp: June 30, 2023, 03:45:28 pm
content: Quote from: veedub565 on June 30, 2023, 03:32:18 pmNo.

author: veedub565
author_rank: Frequent Contributor
timestamp: June 30, 2023, 03:56:38 pm
content: Thanks

author: jonsikul
author_rank: Contributor
timestamp: July 09, 2024, 02:10:05 pm
content: Did you ever get this to work?

author: m k
author_rank: Super Contributor
timestamp: July 09, 2024, 06:58:37 pm
content: If not then ROMs can be too slow.1 in -1DC of original type indicates that access time is 100ns, one place states that 170ns is max.Filenames have -2 in them, that indicates 200ns.Manuals didn't help, or I was too fast.

author: veedub565
author_rank: Frequent Contributor
timestamp: July 15, 2024, 04:29:51 pm
content: Turns out there was a fault with the prommer that caused some of the data to be missing. I sent them back to be done again and it worked fine.

author: m k
author_rank: Super Contributor
timestamp: July 15, 2024, 07:47:17 pm
content: I had to make my own copier when Mini-Pro didn't read some weak bytes.

author: veedub565
author_rank: Frequent Contributor
timestamp: July 19, 2024, 07:16:12 pm
content: Well it was programming them from a file rather than copying from another EPROM. Not sure what the fault was, but the vendor rectified it anyway.

author: m k
author_rank: Super Contributor
timestamp: July 20, 2024, 12:11:41 pm
content: I've also had some ZIF lock problems with MiniPro.Can't say for sure which side, some components have had symptoms, some don't, but all are old.
PIC32MK embedded systems core re-programmable by web-page! - Page 1
Forum section: electronics / general

author: rich t
author_rank: Contributor
timestamp: July 16, 2024, 09:58:52 pm
content: I've been working on this for about a year and finally have it done.It's pretty cool -- by day it masquerades as a USB oscilloscope (see the other post), but by night it is a fully re-programmable embedded system core that you can re-program and interactively debug with nothing more than a web-page in a web browser!It uses WebUSB (and/or Web Serial) which expose connectivity to USB devices directly into a Chromium-based web browser running on a computer, tablet, or even phone!It is open source with a $13 BoM (and you can buy it from Elecrow for $18).Build instructions are here:https://hackaday.io/project/192598-flea-scope-usb-oscilloscope-18-18-msps-webusbUser's Guide is here:https://rtestardi.github.io/usbte/flea-scope.pdfBelow is an example of logging in with a web-page and reprogramming a simple hello-world blinking led on pin e2!
Create my own TV test pattern generator  - Page 1
Forum section: electronics / general

author: Sainti
author_rank: Newbie
timestamp: July 12, 2024, 12:26:36 am
content: Hello,I would like to ask again about building my TV pattern generator because I still don't have any knowledge about how to build it and what components are required for which I want to create replicas such as PM5544, PM5534, PM5644 or others. Is there anyone who can offer me a way to get there?Kind regards

author: mianos
author_rank: Regular Contributor
timestamp: July 12, 2024, 04:33:07 am
content: Biluni has done it a few times:https://github.com/bitluni/ESP32CompositeVideoThat could be used to make the most basic non precision test patterns.For a proper precision signal I'd guess you would need an FPGA and a DAC. Not too hard if you know that stuff. Probably impossible if you don't or don't want to spend the time and effort to learn the structure of the signals and how to make some VHDL, Verilog or similar to make them.Some people just use an MCU but I think you would want to bit more in hardware to deal with the total clock rates needed.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 12, 2024, 05:12:06 am
content: Quote from: Sainti on July 12, 2024, 12:26:36 amI think you can still buy RGB (analog) to Composite Video encoder chips.That manages all the Analog/phase stuff and you just need to feed it information.There are still available parallel DAC, like ADV7123, that are an overkill, but simple to apply.In 2024 a simple way to manage that would be a sprinkle of fast SPI Serial SRAM, Microchip now make 4MBit SRAM, so you might allocate one for each of R,G,B,Sync.- you then fill the RAM from FLASH with any pattern you like, and play back.With a bit more SW effort, you could look at a part like Parallax P2.That has Video DACs and high speed IO, that could probably swallow everything into a single part.eghttps://forums.parallax.com/discussion/173102/ntsc-pal-driver-without-dot-crawl-new-version/p1

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 14, 2024, 01:00:09 pm
content: Just get a Raspberry Pi of some sort and use the composite out on it.

author: Sainti
author_rank: Newbie
timestamp: July 15, 2024, 01:37:39 pm
content: I recommend using two sources of Philips pattern generator to replicate them too.https://github.com/inaxeon/PhilipsPatternRomhttps://github.com/inaxeon/PTV_Preservation
Motor  Quadrature encoder and UVW outputs - Page 1
Forum section: electronics / general

author: JoeyG
author_rank: Regular Contributor
timestamp: July 13, 2024, 03:47:00 pm
content: I have a motor with encoder that has a Quadrature encoder output AND a UVW output.My motor controller mcu has Quadrature encoder hardware decoder a but I wonder what the advantages of using the UVW outputs are.The motor is a 3 phase PMSM (or BLAC) / BLDC .What would be the advantage of UVW?My internet search only review limited results

author: Doctorandus_P
author_rank: Super Contributor
timestamp: July 13, 2024, 05:42:16 pm
content: UVW is probably intended for direct phase control. In such a case they are connected directly to power switches, and this turns the motor into a "brushed" DC motor, but without the brushes (and their wear and reliablity issues).With UVW you also have a direct indication of the magnetic pole position of the motor. With quadrature, you need some extra way to calibrate the "zero" position of the motor axis.

author: jwet
author_rank: Frequent Contributor
timestamp: July 14, 2024, 05:15:29 pm
content: This has changed some in the last 20 or so years as sensors and IC's have entered the scene.UVW are commutation control outputs and are traditionally aligned with the structures in the motor- resolution is generally the small number of poles in the motor, angular accuracy is not great since traditionally separately mounted hall devices are used but read on. Quadrature outputs have traditionally been produced by an optical encoder with a slotted wheel and have much high resolution up into thousands- their phase is not aligned directly with the motor. In a lot of modern BLDC motors, both of these outputs are produced by a rotary angle sensor from a single special magnet. The input for both is the same and the outputs are synthesized. In general, UVW are useful for speed control and commutation and incremental is used for precision angular displacement (stepper like).The rotary angle sensors used have good app notes. Sensima (acquired by MPS), Allegro and Melexis make most of the IC's. You'll have to work your way through which is better in your case. The synthesized outputs have different kind of errors from the old outputs and require some rethinking.Good luck.

author: mtwieg
author_rank: Frequent Contributor
timestamp: July 15, 2024, 12:04:13 pm
content: Not uncommon to see both hall sensor and quad encoder in a servomotor application. The hall sensors are used by the lowest-level motor controller, which implements speed control. The quadrature encoder can be used by a master controller implementing position/servo control, with the speed controller as its slave.The quadrature encoder could also be used a redundant sensor for functional safety.
ATmega8 stopped responding ! - Page 1
Forum section: electronics / general

author: Swaroop 21
author_rank: Regular Contributor
timestamp: July 22, 2024, 11:18:46 am
content: I have a Atmega8 on a sensor board which contains a Accelerometer (MMA7361L). The ATmega8 doesn't have any crystal osc. and when I first soldered it, I burned the bootloader using a USBASP programmer for running on internal 8Mhz Freq. and uploaded a simple ADC sketch to print the X,Y,Z values. It worked fine but then the other day I was playing around with ATMega328PB and then I switched back to my sensor board with ATmega8, got in the tools section and I believe that when I burn the bootloader again it defaulted to its normal configuration i.e. External 16Mhz in the tools option and I didn't catch it which after that it stopped responding. I tried to burn the bootloader again and it said no target found. I haven't burnt any wrong bootloader. I used the MiniCORE boards manager. Is there a way to retrieve it without the external crystal or is there other problem which can't be fixed ? I don't think I killed it as I didn't misconnect anything. So what can be the reason for it to not detect neither burn a bootloader.

author: mikerj
author_rank: Super Contributor
timestamp: July 22, 2024, 12:28:55 pm
content: After programming the fuses for an external clock you will need to apply a clock to the XTAL1 pin to enable any further programming. It doesn't need to be a crystal or resonator, you could use e.g. a 555 timer or use your Mega328 to supply a suitable temporary clock until you reset the fuses to the correct value. You must set the programmer clock to 1/4 or less of the AVR clock frequency e.g. if you apply a 1 MHz clock, set the USBASP to 250kHz or lower.

author: Swaroop 21
author_rank: Regular Contributor
timestamp: July 22, 2024, 01:14:39 pm
content: I will give it a try. Thanks

author: madires
author_rank: Super Contributor
timestamp: July 22, 2024, 01:21:27 pm
content: If you have a programmer supporting the HV mode (parallel) you can use that alternatively.
esp32 : custom heap size in  FreeRTOS - Page 1
Forum section: electronics / general

author: digitalectron
author_rank: Contributor
timestamp: July 10, 2024, 01:29:00 pm
content: Hi, there ."How can I increase or decrease the total heap size in the Arduino framework and FreeRTOS by default using PlatformIO?

author: mikerj
author_rank: Super Contributor
timestamp: July 11, 2024, 08:19:50 am
content: Heap size is set by the #define configTOTAL_HEAP_SIZE in FreeRTOSConfig.h
[Solved]-CH32V003 NOT RESETTING? - Page 1
Forum section: electronics / general

author: kgavionics
author_rank: Regular Contributor
timestamp: July 06, 2024, 05:39:07 pm
content: HelloI have 2 boards based on the CH32V003, they are almost identical, except one has a push button and the other doesn't. I checked both boards pins PD7 (NRST) on the chip is connected to the PD7 on the board, but for some reason, on the first board (second board test start at 0:11 in the video) if I pull the PD7 down it resets and the second board doesn't. I flashed the same code on both, but I can't find any logical explanation why I can't have the external to work on the second board? Does someone have an idea what's going on here?TIAhttps://youtu.be/fu6yPqkV4j8

author: rhodges
author_rank: Frequent Contributor
timestamp: July 06, 2024, 07:46:01 pm
content: Maybe one has the user option byte bits RST_MODE set to '11' to enable D7 as GPIO?Look in the reference manual section 16.5

author: kgavionics
author_rank: Regular Contributor
timestamp: July 06, 2024, 10:57:31 pm
content: Thank you rhodges, I think you are right! Now, I'm digging how to erase the user option bytes.Update:I successfully, configured NRST PIN as NRST function using minichlink (https://github.com/cnlohr/ch32v003fun).
Microcontroller simulation ERROR - Page 1
Forum section: electronics / general

author: yalect
author_rank: Regular Contributor
timestamp: July 03, 2024, 11:52:16 pm
content: Hi;I would like to ask you that I got simulator ERROR forPIC 16F84 Microcontrollerwhen I want to simulate a circuit withMultisim10it show me that it'sunable to find object file c:\......................or maybe my project directory and the simulator or compiler unable to compile myCcode and it doesn't make any different or change even when I do make mistake to see a process?.Thank you.

author: yalect
author_rank: Regular Contributor
timestamp: July 05, 2024, 12:34:18 am
content: Sorry,I made repair for C compiler which is combined with Multisim and it seems work but I found this result afterNote: Due to path length limitations in the Hi-Tech Linker utilities, the path C:\Users\.................................................etc,has been mapped to the drive Z: temporarily for this operationError: Failed to generate Z:\project1.hexI have notZ:\Drive?!hoping to reply.Thank you.

author: xvr
author_rank: Frequent Contributor
timestamp: July 05, 2024, 06:03:31 pm
content: QuoteMultisim made it for you:Quotebut unsuccessfullyTry to move your project to directory closer to the root of disk

author: yalect
author_rank: Regular Contributor
timestamp: July 05, 2024, 06:17:57 pm
content: Sorry, where can I find Z:\ Drive and in PC and How can I change it, or maybe moving it closer to the root of disk.Thank you.

author: xvr
author_rank: Frequent Contributor
timestamp: July 05, 2024, 06:26:47 pm
content: QuoteNot Z drive. Use any real one on your PC. I think it will be C: Just move your project in root of your Documents directoryOr right in root of C:\

author: ozcar
author_rank: Frequent Contributor
timestamp: July 05, 2024, 07:09:54 pm
content: Running as a non-admin user? Perhaps some permission problem.But then, does that message really mean that it was unable to map the folder to Z:, or could it perhaps be caused by some other error that prevents it from creating project1.hex? After all, it says "...has beenmapped to the drive Z:"Disclaimer: I've never used Multisim or anything from Hi Tech.
Segger J-Link EDU Mini pinouts - Page 1
Forum section: electronics / general

author: amwales
author_rank: Regular Contributor
timestamp: July 03, 2024, 12:31:00 pm
content: I was hoping that paying for a Segger would reduce frustration learning to program a new MCU.I just received a Segger J-link EDU mini, the plan was to get some stm32 experience, hook up an MCU on a breadboard and program it, simple. What surprised me is my own level of incompetence trying to find any HW documentation regarding the J-link on the Segger website, I was expecting to find at least a pinout diagram for the 10pin header on the J-Link. I found this 20pin descriptionhttps://www.segger.com/products/debug-probes/j-link/technology/interface-description/But the only 10pin pinout I could find was on another websitehttps://mavink.com/post/4A003485AEB1FA7E1D6478BAB963663F05AM8CAD09/j-link-pinoutI am surely doing something wrong if I cant find something as basic at that on the manufacturers site.Why is this so hard?Further searching maybe its a standard Arm Cortex 10pin debug connector?

author: nali
author_rank: Frequent Contributor
timestamp: July 03, 2024, 12:50:05 pm
content: Yeah, Segger documentation is a bit hit & miss sometimes.https://wiki.segger.com/9-pin_JTAG/SWD_connector

author: amwales
author_rank: Regular Contributor
timestamp: July 03, 2024, 01:02:08 pm
content: Thankyou there it ishttps://wiki.segger.com/J-Link_EDU_Mini9-pin even though there are physically 10-pinsAnd then againhttps://www.segger.com/products/debug-probes/j-link/models/j-link-edu-mini/'Target interface 9-pin 0.05'' Samtec FTSH connector'

author: ataradov
author_rank: Super Contributor
timestamp: July 03, 2024, 02:11:48 pm
content: This pinout is what is called "Cortex-M debug connector". It is the standard set by ARM, so it applies to a lot of tools. There is an ARM document describing it too.It sometimes called 9-pin because one of the pins is supposed to be a key and physically missing. But in practice nobody bothers with the key. And ARM and most other people just call it 10-pin.
A55 interrupt latency - Page 1
Forum section: electronics / general

author: glenenglish
author_rank: Frequent Contributor
timestamp: July 02, 2024, 09:41:19 pm
content: Anyone got any data on Cortex A55 minimum interrupt latency ? Cant find anyting in the ARM tech manual.In non virtualized mode. Private moderate sized core speed L2 would enable the critical IRQ service code to be locked there.... leaving only the bus and GIC latency ? I dont know a whole lot about the GIC inner workings.Altera are making a strong pitch to me with their new Agilex 5, has A76/A55. I'd be converting from my A53/R5 cores on the MPSoC.On MPSoC, the R5 cores with their private TCM and own AXI in the LPD have low latency. Of course you are at the overall bus mercy, depending on where the fabric produced data (the irq source etc) is dumping the data into.....and still doesnt compare to the latencyperformance of a softcore in fabric with BRAM memory with overall irq latency of a few cycles.My (arse) guess is that Altera are expecting you to drop a NIOS soft core if you need low latency .-glen
Battery Bulging Issue: Causes and Solutions? - Page 1
Forum section: electronics / general

author: Edward_Jason
author_rank: Newbie
timestamp: June 27, 2024, 10:47:12 am
content: Hey everyone,I have noticed that my new phone battery is bulging and pressing on the LCD touchscreen, similar to my previous battery. What could be causing this issue to occur so soon? And what steps should I take to resolve it and prevent it from happening again?[Spam link removed]

author: bson
author_rank: Unknown
timestamp: June 27, 2024, 09:38:17 pm
content: The battery is defective or the battery management controller in the phone is defective. Either way it's a potential fire hazard and it should definitely be replaced under warranty if it's a new phone. There's nothing reasonable really to be done to prevent it. Older batteries will puff out when they reach the end of their life, or are either overcharged or overdischarged.

author: Whales
author_rank: Super Contributor
timestamp: June 27, 2024, 11:16:13 pm
content: LiPo chemistry is complex, there are many possible causes of battery puffing and failure.Somecauses include:* Early in life: bad battery chemistry* End of life: "expected" failure.* Wrong charge voltage (most cells are only rated to 4.2V, but some phones expect 4.4V cells and will charge them to this)* Mixture of high ambient temps and holding the voltage at max for long periods of time* (Citation needed for this one, not certain if proven) micro-charge and discharge patterns.Quote from: Edward_Jason on June 27, 2024, 10:47:12 amAre you suffering bad or fake touch events? If so then that needs to be addressed separately.QuoteNew phone or new battery?Either way does your country have decent warranty laws? Puffing battery in a phone is a major failure.

author: Siwastaja
author_rank: Super Contributor
timestamp: June 28, 2024, 08:05:17 am
content: Bad battery. This is what you often get with third-party aftermarket replacements. Just replace under warranty. Or if ebay/aliexpress crap, just don't buy again.

author: Whales
author_rank: Super Contributor
timestamp: June 28, 2024, 12:15:47 pm
content: Wow, account banned. I didn't spot a link earlier, perhaps it was hidden or edited in later.I wonder if that means the entire question was bot generated? If so then I was none the wiser.

author: bson
author_rank: Unknown
timestamp: June 28, 2024, 10:02:42 pm
content: Ah, I misread 'new phone battery' to mean new phone, but it makes sense if it's a new battery in an old phone. I'd place my bets on a defective battery or wrong chemistry (causing overcharging).

author: bson
author_rank: Unknown
timestamp: June 28, 2024, 10:03:40 pm
content: Quote from: Whales on June 28, 2024, 12:15:47 pm¯\_(ツ)_/¯
WCH-32V003 status of chip is wrong? - Page 1
Forum section: electronics / general

author: kgavionics
author_rank: Regular Contributor
timestamp: June 28, 2024, 01:18:10 pm
content: HelloI bought a dozen of the tiny boards powered by the WCH 32v003 (see picture below). I used one in my first project, and it went very well. Now, I can't get another board to connect with my CH-LINK Programmer (see picture 2). The CH-link utility is complaining it's the wrong chip, but the chip is for sure the ch32v003.I attached a screenshot of the ch-link with a first working board (see picture 3). At this point, I think that maybe the chip is defective, but the onboard LED is blinking, that's why I'm confused.Is someone having the same problem as me? Any help would be much appreciated.Thank you in advance

author: brucehoult
author_rank: Super Contributor
timestamp: June 28, 2024, 01:52:02 pm
content: If you have a dozen of them, have you tried the other ten?

author: kgavionics
author_rank: Regular Contributor
timestamp: June 28, 2024, 02:10:58 pm
content: Quote from: brucehoult on June 28, 2024, 01:52:02 pmwhy I would try them all. What this would change? I'm trying to fix this problem even if all the rest are working fine!

author: kgavionics
author_rank: Regular Contributor
timestamp: June 28, 2024, 02:31:18 pm
content: Update :I tried 2 more boards and I have the same problem!I think I found the problem: the aboard LED is hooked to PD1 pin which also serve as SWD function for the CH-link. Now, I have to find a way to unbrick the chip.
W25Q128BV image - Page 1
Forum section: electronics / general

author: haggar
author_rank: Contributor
timestamp: June 28, 2024, 01:50:30 pm
content: Hi all,First off, this is not my area of expertise (which will become apparent very quickly).I have an image taken from a W25Q128BV, and what I'm trying to do is make sense of the data that is in there.From the datasheet (am I allowed to post links), it states it's(8M-bit) Serial Flash memorySo my first question is; is this NAND/NOR, or is "Serial Flash Memory" another thing altogether?I unfortunately don't much about the parent device this came from, other than it's from a car's multimedia unit.Ultimately I just need to get the data out of it, either ignoring ECC, or applying it, if possible.Are there any tools that can be used on flash images to try to identify data, by figuring out the ECC/OOB areas, or does it depend on how the parent device actually uses the storage?I'm hoping this question makes sense, but if it doesn't , please let me know, and I'll try clarify.Any input, or advice would be greatly appreciated.Thanks

author: wraper
author_rank: Unknown
timestamp: June 28, 2024, 01:58:34 pm
content: Most likely it's NOR flash, but whatever the actual underlying technology is you just read/write the data as is.

author: haggar
author_rank: Contributor
timestamp: June 28, 2024, 02:04:09 pm
content: I was under the impression that with NAND/NOR, the data is stored in pages, and each page contains the actual data, and then OOB/ECC code.So reading it as is, will give me the data, plus all of the other stuff, that isn't really data.So I need to identify what is actual data, and what is control stuff, that can either be ignored, or used to correct errors.Or am I misunderstanding something?Thanks

author: wraper
author_rank: Unknown
timestamp: June 28, 2024, 02:06:49 pm
content: You deal with bad blocks and error correction in NAND only. These are inherently supposed to always return good data.

author: haggar
author_rank: Contributor
timestamp: June 28, 2024, 02:10:11 pm
content: Ahh I see, thanks for clarifying.How did you identify it as NOR?

author: wraper
author_rank: Unknown
timestamp: June 28, 2024, 02:20:34 pm
content: Quote from: haggar on June 28, 2024, 02:10:11 pmBecause NOR was/is generally used for this purpose and I just foundhttps://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/?__locale=enwhere they say 25Q family is NOR flash. However these days I would not be 100% sure if manufacturer does not explicitly say so as there is a possibility manufacturer could use cheaper NAND hidden behind internal data integrity management. Although it would really make sense only for much larger capacities.

author: haggar
author_rank: Contributor
timestamp: June 28, 2024, 02:23:57 pm
content: That all makes sense, thanks for the information, I appreciate it.
Woowwee Roboquad Reverse Engineering - Page 1
Forum section: electronics / general

author: theguyreversed
author_rank: Newbie
timestamp: June 26, 2024, 09:23:25 pm
content: I want to improve the robot I have, I plan to add camera, Raspberry Pi, etc. plug-ins to it in the future. But right now, I want to release the software of the current Roboquad. So that I can examine it, but these processor pins do not look familiar at all.It uses G7303-2C, which is an old processor. I have shared its pins below. Is there anyone who has worked with this type of processors before? How can I extract the software?Code:IDVOD_PB VDD_PM PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 PB8 PB9 PB10 PB11 PB12 PB13 PB15 PC0 PC1 PC2 PC3 PC4 PC5 PC6 IDVOD_PC VDD_CPU AGC AVCD_AD VREF AVSS_AD RVOUT OSCI OSCO OSCS VDD_OSC PLLC RSTB AVOD_DA DAC0 AVSS_DA PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 PA0 PA1 IDVOD_PWM PA1 PA2 PA3 PA4 PA5 PA6 PA7 PA8 PA9 PA10 PA11 PA12 PA13 AVDD_AD
DAC and ADC on one parallel bus on a Pico - Page 1
Forum section: electronics / general

author: DocRaptor
author_rank: Contributor
timestamp: June 24, 2024, 09:06:23 am
content: Hello,I want to hook an ADC, more specific an ADC1173, and a DAC, which will consist of a 74AHC373 and a discrete R2R DAC, on a single databus and use a single Nand gatter to switch between them. I want to do this to save pins on a Raspberry Pico for other things. My question is if the 74ahc family quick enough this? I want to use the ADC at 10 to 15 msps and when the PIO is pulling data from the ADC and pushing it in to the TX FIFO, I plan it to switch to the DAC after each sample and pull from the RX FIFO 8 bits and push them to the 74AHC373.

author: xvr
author_rank: Frequent Contributor
timestamp: June 24, 2024, 12:15:47 pm
content: QuoteYes. It can operate up to 50-100MHz. But you ask wrong question - will RPi Pico fast enough to sync-on-adc/read/set-oe-to-1/change-direction-of-pins/write-data/write-strobe/change-dir-back/set-oe-0 (all of this) with 15MSps rate? Programmable GPIO in RPi Pico can do 1/2 bit activity, but it can't manage 8 bit port read/write.

author: TomKatt
author_rank: Frequent Contributor
timestamp: June 24, 2024, 04:39:10 pm
content: Quote from: xvr on June 24, 2024, 12:15:47 pmThat's what I'm thinking also... I view the Pi as more of a cpu with GPIO than a dedicated microcontroller - it's great for running an OS but not the fastest when it comes to direct IO control. It's quite possible that an SPI or I2C ADC / DAC setup would be more efficient on a Pi.

author: xvr
author_rank: Frequent Contributor
timestamp: June 24, 2024, 05:14:42 pm
content: QuotePI Pico is a microcontroller, not abigCPU. It will not run OS (except FreeRTOS may be), but IO speed problem still exists.It probably can run DAC/ADC service, but it will take almost 100% of CPU, I guess.May be second core will help (it's 2 core MCU), who knows

author: DocRaptor
author_rank: Contributor
timestamp: June 24, 2024, 08:43:52 pm
content: Quote from: xvr on June 24, 2024, 05:14:42 pmI won't use the two MCUs Cores. I will use one of the PIOs, which are made for this. 10MSPS to 15MSPS (But I lean more to just go with 10MSPS) is in low side of what people did. One person pushed it (with a different ADC) to 100MSPS using PIOs, DMA, and wrote it in python.In case I can not let the DAC and the ADC1173 share one bus I would go with the LTC2315-12 as the ADC (with the DAC I would need to look). It is only 5MSPS (I wish more but if it is not posible I have to live with it), but it is a 12 bit ADC and it uses a SPI-interface. The reason for these to is that I set me a limit of 10€ max for the ADC.