hybridfree/eevblog-posts huggingface dataset:
Seeing a bunch of noise on the RESET pin of AVR (OUTDATED. DO NOT REPLY) - Page 1
Forum section: electronics / general

author: Kalcifer
author_rank: Regular Contributor
timestamp: June 01, 2021, 09:03:23 am
content: (https://imgur.com/a/KXJqzba) is a video of what I’m seeing when I probe the reset pin of the microcontroller (Attiny84A). If I do a single shot, it appears that there is a serial data stream but I have no idea why. The microcontroller is not in debug mode (debugWire). The fuse is set for ISP, plus I can program in ISP. There is nothing connected to the reset pin, so the microcontroller itself seems to be generating this. Since the reset pin is going crazy, the microcontroller is also not working right; the microcontroller is not executing its program. What the heck is going on here? What setting am I missing?For proof that it’s not in debug mode, the high fuse is 0xDF, so DWEN is not enabled.Also, (https://imgur.com/a/r1Vgo00) is a video of the reset pin being probed with a pull up resistor to 3.3V. What’s strange is that the pin is being pulled up to only around 2.5 volts even though the voltage rails are at about 3.3V. Plus the line is still extremely noisy. I have no idea what is going on.

author: mikerj
author_rank: Super Contributor
timestamp: June 01, 2021, 09:40:01 am
content: Where is your probe ground connected to? Somewhere close to the AVR ground pin?

author: nuno
author_rank: Frequent Contributor
timestamp: June 01, 2021, 11:36:50 am
content: And using the ground clip instead of the ground lead?

author: Kalcifer
author_rank: Regular Contributor
timestamp: June 01, 2021, 10:48:30 pm
content: An update:I have found the issue to be with the reset line of my Atmel ICE programmer. I probed the reset line of the programmer and found that it is the source of the noise and not the IC (which with the now removed programmer, has a perfectly clean reset pin.) I have no idea what is causing the Atmel ICE to behave in this way. It was working fine the other day.Another point of note is that the noise only appears on the reset pin of the Atmel ICE when the Vcc and GND pins receive power, so when the power is turned on, the reset pin starts going crazy, and when it turns off, the noise disappears. This behaviour is independent to the atmel ice being plugged into the USB port. So it could be disconnected from USB but as long as Vcc and GND have power, then the noise will be there.

author: Kalcifer
author_rank: Regular Contributor
timestamp: June 01, 2021, 11:22:04 pm
content: Since the original content of this post is no longer relevant, I will simply create a new post which is accurate.
FlexIO equivalents - Page 1
Forum section: electronics / general

author: axemaster
author_rank: Contributor
timestamp: May 29, 2021, 09:12:27 pm
content: I noticed one of the most talked-about features of the recent RP2040 is the PIO (Programmable IO). Basically you can program some simple state machines to control GPIO pins to emulate SPI/I2C etc. Except you can modify them to have things like SPI with multiple SDO pins. Unfortunately as the 1st-gen RP MCU, the RP2040 is pretty crippled in other departments such as USB, which sucks because I need high data transmission speeds to a PC.NXP has had FlexIO for years already, and I thought that was pretty much the same thing.Are there other MCU lines with modules similar to the PIO/FlexIO?

author: westfw
author_rank: Super Contributor
timestamp: May 30, 2021, 01:06:24 am
content: QuoteIf by "Crippled" you mean "only goes to 'full speed USB', then I think you will have a difficult time finding a microcontroller-style chip with "high" or "superspeed" USB, regardless of 'interesting IO capabilities.'(if you mean something else, please clarify.)At the "Application Processor" level, you have things like the PRU on BeagleBone chips:https://beagleboard.org/static/prucookbook/

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 30, 2021, 02:05:07 am
content: Quote from: westfw on May 30, 2021, 01:06:24 amThere's now a large number of MCUs supporting USB HS. How difficult is finding them? Those are microcontrollers in every sense of the word. The hard time will be to find one at the same price tag (although I'm sure you can find some from China...)For USB SS, there's not much apart from the Cypress FX3. Which is a microcontroller as well.

author: dferyance
author_rank: Regular Contributor
timestamp: June 01, 2021, 04:51:47 pm
content: Cypress PSoC line has some nice digital features that can accomplish much of what the RP state machines do. They support Verilog for custom digital as well as clocks, timers and other digital logic. So they work very different but you can do custom state machines. It is easy to quickly run out of digital logic trying to do something complex, however I mostly work in PSoC 4 which has more limited digital than the other lines.Some of the PSoC communication blocks actually use the programmable digital features to implement the protocols. So you can use fixed-function blocks or programmable digital.You may run into difficulties with your USB needs. How high speed are you looking? Maybe you need a full microprocessor solution..

author: NorthGuy
author_rank: Super Contributor
timestamp: June 01, 2021, 07:47:57 pm
content: Quote from: SiliconWizard on May 30, 2021, 02:05:07 amThere are ATSAM microcontrollers with HS USB for about $3/piece. But they don't have the nice juicy PIO.Also, you can use FT232H as an external USB for Pico. Use one PIO to tallk to FT232H and another one to do what you need.
Padauk uCs sold out everyhwere - Page 1
Forum section: electronics / general

author: soFPG
author_rank: Frequent Contributor
timestamp: June 01, 2021, 08:50:43 am
content: Someone here who has more information about when Padauk uCs will become available again?They are sold out at LCSC and even on Taobao I am not able to get them

author: daqq
author_rank: Super Contributor
timestamp: June 01, 2021, 09:52:44 am
content: See? This is what happens when you let Dave near a product.

author: soFPG
author_rank: Frequent Contributor
timestamp: June 01, 2021, 10:06:20 am
content: I think the Padauk-Hype is over and this might be due to global chip shortages.I don't know the process they are manufactured with but I thought "coarser" PDKs wouldn't be affected as much as finer ones.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 01, 2021, 10:07:28 am
content: If wafer capacity is in short supply, 2-cent micros are probably going to be quite low priority compared with more profitable lines

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 01, 2021, 01:11:59 pm
content: I've heard some rumors that the global chip shortage is expected to drag along for another two years.

author: GromBeestje
author_rank: Frequent Contributor
timestamp: June 01, 2021, 06:55:06 pm
content: Probably. The factory was down for renovation for two years... and then they'll have to catch up, so that makes sense.
Difference between MC9S08PA16VLC and MC9S08PA16AVLC  ? - Page 1
Forum section: electronics / general

author: Circlotron
author_rank: Super Contributor
timestamp: June 01, 2021, 03:30:18 am
content: Like many things lately, my favourite micro is in short supply and I'm considering several substitutes. Does anyone know the difference between the A and the non-A version of the above micros?

author: JPortici
author_rank: Super Contributor
timestamp: June 01, 2021, 04:22:17 am
content: https://www.nxp.com/docs/en/data-sheet/MC9S08PA16_Rev.1.pdfon the cover and paragraph 3.3
ILI9341 TFT library Arduino to TMS320F280049 - Page 1
Forum section: electronics / general

author: Jester
author_rank: Frequent Contributor
timestamp: May 23, 2021, 01:35:10 am
content: I have an existing and fully working circuit (hardware and firmware) that uses both a TMS320F280049 (straight CPP code) as well as a SAMD21 running Arduino code.The DSP is getting data from various sensors, processes the data, controls the widget and then sends some display data in the form of simple commands to the SAMD21 via SPI. The Arduino code then uses the open source Adafruit ILI9341 display libraries to drive a TFT display, with a 2nd SPI port. The Arduino code also sends touchscreen data back to the DSP, again using SPI.The DSP has plenty of available resources and in an ideal world I would like to eliminate the SAMD21 and simple have the DSP drive the TFT display directly instead of using the SAMD21 and Arduino code as a go between.The Adafruit libraries seem to be Arduino specific, in that they use code such as spistart(), digitalwrite() etc. so not very portable in my inexperienced opinion. What are the odds that an open source library for these common ILI9341 style displays is available for the F280049 and where does one look to find it if it does exist?I'm more of a hardware designer, so I'm somewhat out of my depth when it comes to porting code from one platform to another.

author: GromBeestje
author_rank: Frequent Contributor
timestamp: May 25, 2021, 07:54:55 pm
content: There is ucglib, (https://github.com/olikraus/ucglib) which has support for ILI9341It has support for a Hardware Abstraction Layer (https://github.com/olikraus/ucglib/wiki/hal)which allows it to be easily ported.

author: Gribo
author_rank: Frequent Contributor
timestamp: May 27, 2021, 02:21:36 pm
content: Having a separate display and user input processor has its advantages. The main DSP doesn't have to deal with all this user facing stuff, making the real-time sensor portion more predictable.

author: Jester
author_rank: Frequent Contributor
timestamp: May 29, 2021, 12:01:52 pm
content: Quote from: Gribo on May 27, 2021, 02:21:36 pmTrue, however the DSP does the time sensitive tasks in Irq and has more than enough capability to run the display stuff in the main loop.Might have to port the Arduino library to work with the DSP.
How to dump an Intel MCS-48 8021 ROM? - Page 1
Forum section: electronics / general

author: artess97
author_rank: Newbie
timestamp: May 08, 2021, 01:49:18 pm
content: Got an old processor from a Pro One synth I'm trying to dump the ROM from, if it still works.I've attached a pdf of the datasheet.On page 5 of the document, there is info to dump the contents to Port 0 (which I assume with be the 8 bit bus on pins 4 thru 11)" alt="" class="bbc_img" />So, would I need a logic analyser to read and store the contents and does the VCC also need to be powered? (i would guess to 5V and not the 15V of the other pins )Perhaps someone with more knowledge on these early chips can help.

author: Ian.M
author_rank: Super Contributor
timestamp: May 08, 2021, 02:43:49 pm
content: Yes, Vcc needs to be powered in its normal range - that's implied by the existence of Mode 2 in that chart.Although you *could* use a logic analyser to capture the data you'd also need to pulse TEST1. It would be a *LOT* simpler to use a 5V Arduino. The RESET pin would need to switch between +5V (in Reset) and +15V and PROG also needs to go to +15V to enter Mode 1B, so you can strap them together and drive them from a suitable level shifter controlled by an I/O pin - probably the easiest here would be a RRIO OPAMP powered between >= +15V and Gnd, configured as an inverting 2X amplifier with its +in strapped to +5V. When its input is at 0V its output will be 15V and when at 5V, its output will be at 5V. Caution: if you want to power the Arduino from the external >= 15V supply you'll need to preregulate down to <12V for Vin e.g. with a LM7809.The sketch should initially set RESET and PROG at 5V, then take them high and pulse TEST1 to output each program memory byte, capturing it on IO pins so it can be sent to a terminal program on the PC in whatever format you prefer for a ROM dump. Its easier on an Arduino Mega as its got full 8 bit ports available whereas an Uno or Nano looses two port D pins to serial comms with the host so you'd have to use two pins of a different port and reconstitute the program byte accordingly. Use D2-D7 (PortD2:7) for bits matching the pin number, and D8-9 (PortB0:1) for the two LSBs and you can simply do:Code:byte=(PORTB&0x03)|(PORTD&0xFC);

author: 8bitrepair
author_rank: Newbie
timestamp: May 26, 2021, 09:51:58 pm
content: I'm new in this forum and i'm trying the same thing, this brought me bit further thx.but im still a little bit confused do i need to pulse TEST1 between +5V and +15V ? and is it pulsed once too dump the full ROM or mutliple times at a specific frequency ?
STM32L0xxx - check if STOP mode was exited? - Page 1
Forum section: electronics / general

author: poorchava
author_rank: Super Contributor
timestamp: May 20, 2021, 06:33:11 am
content: I have an STM32L010 and I'm using the STOP mode with wake-up by EXTI. Is there a way to determine within the IRQ if STOP mode was just exited? I know there is such flag for STANDBY mode, but I can't see one for the STOP mode and I need this information to fix some config issues that appear when goin low power (eg. setting clock back to PLL mode).Any idea how to do it? ST doesn't seem to have an example code for the STOP mode for this uC family.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: May 20, 2021, 06:56:19 am
content: That can be solved the other way: disable IRQ, do WFE, reinit clocks and pins (you may want to set some pins to specific states before WFE to reduce currents), enable IRQ. Seehttps://m0agx.eu/2021/04/16/stm32-stop-mode-exti-wakeup-example-without-hal/

author: poorchava
author_rank: Super Contributor
timestamp: May 20, 2021, 10:18:45 am
content: I should probably rephrase: I have an EXTI IRQ, which is used both at normal runtime (basically, it's hooked up to keypad) and to wake the uC up. I'm looking for something, to determine within EXTI IRQ code if the uC was in STOP mode before IRQ happened or not.Currently, I'm just checking the PLL status bits, and if it's off I assume this is due to uC being in STOP mode before, and reinitialize the peripherals. I was looking for some cleaner solution, as this seems a bit of a hack.The STOP mode entry etc works just fine. The only thing is that all possible pending IRQs need to be menally cleared before WFI, and that includes SysTick.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: May 20, 2021, 11:21:40 am
content: But if you reinit everything right after WFE and before enable_irq - you don’t need to care about reinit in EXTI ISR, it’s already done.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: May 20, 2021, 12:22:19 pm
content: Ah, I see now, you’re usingWFIto sleep, notWFE- that’s why you need to clear all pending IRQs. With WFE you have more control on wake up sources (if you don’t set SEVONPEND bit on NVIC the IRQs will be ignored and the only wake source will be EXTIs marked as events in EXTI_EMR register), plus it adds an additional latch between IRQs (if you use them for wake up, SEVONPEND is set) and wake up - the event register that can be cleared with SEV-WFE sequence (that’s the part of "magic sequence" in my example above) without clearing all possible IRQs.
ATSAMC21 with Harmony 3 using timers... - Page 1
Forum section: electronics / general

author: NivagSwerdna
author_rank: Super Contributor
timestamp: May 17, 2021, 11:59:45 pm
content: I'm trying to use TC2 to time an interval...The idea was...Code:TC2_Compare16bitCounterSet(0);TC2_CompareStart();// do stuffTC2_CompareStop();uint16_t timer_count = TC2_Compare16bitCounterGet();But this always gives me ZERO!I did some experimentation and TC2_Compare16bitCounterGet always gives zero when the timer is stopped... that seems a bit weird.. could it be a silicon flaw? I cannot see it listed in the errata.PSStart is essentially... TC2_REGS->COUNT16.TC_CTRLA |= TC_CTRLA_ENABLE_Msk;Stop is essentially.... TC2_REGS->COUNT16.TC_CTRLA &= ~TC_CTRLA_ENABLE_Msk;CounterGet is TC2_REGS->COUNT16.TC_CTRLBSET |= (uint8_t)TC_CTRLBSET_CMD_READSYNC; return TC2_REGS->COUNT16.TC_COUNT

author: ataradov
author_rank: Super Contributor
timestamp: May 18, 2021, 12:27:58 am
content: Enabling and stopping are two separate operations. Stopping is done through the CTRLBSET.CMD = STOP (0x2).
NXP says S08P family is "pin compatible" but datasheet says not - Page 1
Forum section: electronics / general

author: Circlotron
author_rank: Super Contributor
timestamp: June 01, 2021, 12:08:09 pm
content: Just comparing the pinouts of various micros in the NXP S08P family, looking for substitutes because of shortages. The S08PL*AVLC has different Vss and Vdd connections than the S08PA*AVLC series despite what the website says.Quotehttps://www.nxp.com/products/processors-and-microcontrollers/additional-mpu-mcus-architectures/8-bit-s08-mcus/8-bit-5v-full-featured-mcu-with-eeprom:S08PA

author: amyk
author_rank: Super Contributor
timestamp: June 01, 2021, 01:31:46 pm
content: Marketing was not pleased with "mostly pin-compatible"...
Are Lamport Clocks easy or difficult to implement and debug in practice? - Page 1
Forum section: electronics / general

author: e100
author_rank: Frequent Contributor
timestamp: May 15, 2021, 03:41:46 pm
content: Wikipedia pagehttps://en.wikipedia.org/wiki/Lamport_timestampI read a number of descriptions and watched a couple of youtube videos so it sounds like the sort of thing I need for my 3 node distributed system but what's it like to actually implement in practice? Will a variable network latency or missing messages cause it to fail and give bogus non-sensical results, or will it be obvious that something is wrong and the data shouldn't be trusted?
Flashing ESP32 - Page 1
Forum section: electronics / general

author: Nikos A.
author_rank: Regular Contributor
timestamp: May 13, 2021, 07:33:21 am
content: Hi everyone,I want to intergrate the ESP32-S2-MINI module into my design.https://eu.mouser.com/datasheet/2/891/esp32_s2_mini_1_esp32_s2_mini_1u_datasheet_en-1928084.pdfCan I use the JTAG interface for debugging and flashing as well? If JTAG serves both features do I need to include USB connector and USB to UART Bridge?Thanks
ex-AntMiner BBB acting funny. Help? - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: May 10, 2021, 03:40:56 am
content: I bought an ex-AntMiner BeagleBone Black. It lacked the HDMI circuitry entirely with no pads and traces, it lacked all USB power switch and connectors although pads are still there, it lacked any buttons and the power jack, and the eMMC is replaced with 2Gb (512MB) raw NAND. I have restored all those missing parts that still have its pads and replaced the onboard NAND with a 64Gb (8GB) part.Now the BBB in question refuses to boot at all, especially it refuses to do USB boot with the USB boot button pressed and no microSD card present. When I attached a J-Link, the CPU is trapped in Data Abort dead loop.How to fix that?

author: thinkfat
author_rank: Unknown
timestamp: May 10, 2021, 06:49:23 am
content: You could try single-stepping the boot Rom. Also, There are a couple of memory locations in internal sram that store diagnostic codes from the boot process. They might help you find the issue.

author: technix
author_rank: Super Contributor
timestamp: May 10, 2021, 01:57:55 pm
content: I think I have found the problem. On a real BBB the boot selector button pulls SYSBOOT low from 5'b11100 to 5'b11000 to prioritize USB over MMC0, however on my board the default boot mode is already 5'b10011 prioritizing NAND so the button does nothing. I need to cut the boot selector button's ground pin and bodge in a pull up so the button makes 5'b10011 boot selection a 5'b10111, which no longer allows NAND but allows MMC0 and USB boot.

author: technix
author_rank: Super Contributor
timestamp: May 10, 2021, 02:19:32 pm
content: After a quick trip under a knife and a bodge wire, WE GOT ENUMERATION!!!
ID wanted - ST Micro Cortex-M3 ? - Page 1
Forum section: electronics / general

author: DrG
author_rank: Super Contributor
timestamp: May 09, 2021, 06:45:09 pm
content: Trying to identify this chip. It is probably from ~2009 or so.Based on this datasheethttps://www.digikey.at/htmldatasheets/production/110811/0/0/1/str71xf.html(Fig. 48 / P75-76), I think it is from the STR71x family. Looks like no flash. Can anyone confirm? Can anyone read a date code?Thanks

author: ataradov
author_rank: Super Contributor
timestamp: May 09, 2021, 07:21:44 pm
content: Standard ST date codes are YWW. This is 16th week of either 2007 or 2017. Given the device age, I would assume it is 2007.It is 64 pin (R), 256K + 16K (2), BGA (H) device in -40-85C temperature range (6). The letter "F" is omitted on the BGA packages. There is no 64-pin version without memory anyway

author: DrG
author_rank: Super Contributor
timestamp: May 09, 2021, 07:25:29 pm
content: Excellent!Thanks very much.
Cube IDE - STM32 STLINK not detected error - one solution - Page 1
Forum section: electronics / general

author: peter-h
author_rank: Super Contributor
timestamp: May 16, 2021, 04:07:06 pm
content: I've had this a fair few times over the past months and the only fix was to reboot the PC.Finally I tried something else. In Windows Task Manager, when Cube IDE is not running, you should not see any of theseIf you do, terminate that process.That saves the PC reboot.Clearly the software leaves a bit of itself running and that prevents it working. I have others which do the same e.g. the Vegas Pro 16 video editor which needs this every time you run it...This may help somebody.
stm32 how to read register bits in keil - Page 1
Forum section: electronics / general

author: tariq
author_rank: Contributor
timestamp: May 09, 2021, 02:39:48 pm
content: hifor example in register NVIC->ICER i want to read bit number 7 in software .i see it in my debug session but i want my software check it so i looking for a way to read the bitthis register is 32 bit so i defined a 32 bit variable with this commanduint32_t check_register;and thencheck_register=NVIC->ICER;so i can shift the bit in check_register and check bit number 1but this :check_register=NVIC->ICER;doesn't work.how can i read register?what is the best way to read register bits?thank you.

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 09, 2021, 04:30:12 pm
content: How does it fail? Reads nothing? Drops some error?You might want to apply a mask:check_register = NVIC->ICER & (1<<7);What mcu? In Cortex M0 it's just a single ICER register, but in others it's an array:https://www.keil.com/pack/doc/CMSIS/Core/html/regMap_pg.html

author: tariq
author_rank: Contributor
timestamp: May 09, 2021, 04:46:00 pm
content: it's stm32f101vbt6 which is Cortex M3.this commandcheck_register = NVIC->ICER & (1<<7);has error. i uploaded the error picture.all i want is to check the Intended bit in if() command.what is the best way to do it?

author: ataradov
author_rank: Super Contributor
timestamp: May 09, 2021, 05:10:37 pm
content: ICER is an array, there are multiple ICER registers. If you want to check the 7th bit, then it will be located in the first register :check_register = NVIC->ICER & (1<<7);

author: gamalot
author_rank: Super Contributor
timestamp: May 09, 2021, 05:14:31 pm
content: Quote from: tariq on May 09, 2021, 04:46:00 pmThe structure member ICER is an array ofvolatile uint32_t(array length is 1), so the correct syntax should be:check_register = NVIC->ICER& (1<<7);
Is it possible to build an AM3352 boot image without CCS? - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: May 14, 2021, 03:43:00 am
content: As the title suggests, I'd like to do that and flash that (partial) image into my ex-AntMiner modded BBB with 8GB raw NAND boot device.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: May 14, 2021, 07:59:00 am
content: I’ve heard Buildroot can build all boot stages (including MLO/u-boot) for BeagleBone without CCS.

author: technix
author_rank: Super Contributor
timestamp: May 14, 2021, 09:41:46 am
content: Quote from: abyrvalg on May 14, 2021, 07:59:00 amThis is awesome news, although what I want is a Debian-based distribution built without CCS. Maybe what I should do is start with building just the MLO and u-boot outside CCS, just make sure it can net-boot later.
STM nuclo32-l32kc Timer1 internal clock and GPIO on pin PA12 - Page 1
Forum section: electronics / general

author: conducteur
author_rank: Regular Contributor
timestamp: May 06, 2021, 03:34:59 pm
content: HiI'm learning STM32 microcontrollers, and there's something that I don't really understand.It seems that I can't assign Timer1 with an internal clock because I need PA12 as GPIO Output?I tried to find more details in the datasheets, but did not find it. I don't see why a GPIO pin blocks the use of this timer?I want to use ch1 for input capture, but this is on a different pin then PA12 (PA8).

author: gamalot
author_rank: Super Contributor
timestamp: May 06, 2021, 03:48:52 pm
content: No, the internal clock will definitely not conflict with a GPIO pin. There will be conflicts only when you select an external clock source. For example, selecting ETR2 will conflict with PA12 set to GPIO output mode.

author: conducteur
author_rank: Regular Contributor
timestamp: May 06, 2021, 03:57:42 pm
content: Oh thank you. I misunderstood the warning. It's seems logical that it only relates to the options in pink.....thank you!
Calculated UART Baud Rate Does not Match the Baud Rate Expected by the Receiver - Page 1
Forum section: electronics / general

author: Kalcifer
author_rank: Regular Contributor
timestamp: May 06, 2021, 05:26:48 am
content: I am trying to decode a software UART from a microcontroller on my oscilloscope. To do this, I am probing the Tx line with reference to ground, and using the decode feature on my oscilloscope (Siglent SDS 1104X-E). To configure the UART on the oscilloscope side, I have to choose a custom baud rate, as the baud rate of my software UART isn't fine tuned properly. To do this, I measure the period of a bit in the UART data. Then, using the period I simply divide 1bit by the period to get a value in bps.For example, in some UART data that I had sent, I measured the length of 1 bit to be 0.2208ms, so(1 bit) / (0.2208 * 10^(-3) s) ~= 4529 bpsI then set the custom baud rate on my oscilloscope to this value, and press the decode button expecting to see a nicely decoded signal; however, the receiver appears to have received garbage as seen belowhttps://imgur.com/a/xMyAuT4What confuses me is that if I dial down the baud rate to around 4200 Baud, the signal is decoded perfectly as seen belowhttps://imgur.com/a/NihQgJ9This value is so far off from the actual baud rate that I calculated from the signal, so what is going on here? The data is accurate and clean, but the baud rate required for decoding it is so far off.I would also like to note that I don't believe that this is an issue with the oscilloscope, because when I send the data to my PC through an FTDI breakout, and monitor it withCode:screen /dev/ttyUSB0 4529I receive garbage data. The characters received are unknown and result as the unknown ascii character symbol; however what's different in that scenario is that even if I change around the baud rate for `screen`, it is still unable to decode the data no matter what I change it to. What's even weirder with that is that I am receiving the correct number of characters for whatever I send, its just the characters themselves are for some reason unrecognizable, even though the oscilloscope can decode them fine. So I am very perplexed as to what is going on here.P.S. If someone could tell me how to insert inline pictures in these posts, I would be very grateful.P.P.S. I know that I already posted this in "Projects, designs, and Technical Stuff"; I was unsure which sub-forum was the best one to put this in.

author: ataradov
author_rank: Super Contributor
timestamp: May 06, 2021, 05:48:34 am
content: Even if you are unsure, still don't cross post.

author: Kalcifer
author_rank: Regular Contributor
timestamp: May 06, 2021, 05:56:36 am
content: Quote from: ataradov on May 06, 2021, 05:48:34 amfair enough. I will remove this.EDIT: hm it appears that I am unable? It says I cant remove my own posts from this board.
Need help on NEC UPD75268CW program transfer - Page 1
Forum section: electronics / general

author: jamestien
author_rank: Newbie
timestamp: May 17, 2021, 08:07:36 am
content: Hello Everyone,I have an old Kenwood amplifier which uses NEC UPD75268CW as VFD driver and system control, unfortunately it has internal shorted circuit which caused erratic VDF display.According to document its a 4bit single microcomputer chip with 64pins, has custom (Kenwood) program in it. I already bought a new blank chip, and now is seeking for any help on how can I read firmware from the old IC and transfer to the blank IC in order to make it work again.I've had experience with IC firmware download & upload using some programmer, but just cant find any useful guide on this NEC chip.Any help on how to, or firmware transfer service would be appreciated, thank you in advance!

author: coromonadalix
author_rank: Super Contributor
timestamp: May 17, 2021, 09:01:31 am
content: for that kind of problem you have to order the part at kenwood, they are supposed to sell it programmed to your equipment ??not the response you would like, but send them an email or try to find a service center ...

author: jamestien
author_rank: Newbie
timestamp: May 17, 2021, 09:36:40 am
content: Thank you for the advice, I'm afraid if Kenwood can accommodate the request since the amplifier is from early 90's.But I will try.
Scanning all 18 ADC channels of Teensy 4.1 using DMA - Page 1
Forum section: electronics / general

author: c10yas
author_rank: Newbie
timestamp: May 03, 2021, 03:08:27 am
content: I'm trying to build something similar to MarcoRep's pressure-sensing matrix mat but need as high of a refresh rate as possible. I'm planning to use the Teensy 4.1 since I think I need a lot of RAM and processing power to store, process, and transmit the data to a computer using USB Serial. I could use an STM32H7 chip but the teensy4.1 seemed more accessible.The circuit will be a 128x72 matrix. The 72 rows will be connected via a bank of 4:1 analog muxes to the 18 analog inputs of the Teensy. These analog muxes have 2 address pins to select the address, all the pins will be connected in parallel and be driven by the Teensy using a CMOS buffer. The 128 columns will be driven by a serially connected group of shift registers which will all be clocked by another Teensy output pin.Ideally, I'd like to use ring buffers and 3 DMA channels to read the ADC data, change the analog mux positions and clock the shift register by simply writing to the GPIO pins. However, this seemed like the final goal for the project rather than step one. So step one would be to implement the analog reading, mux updating, and clocking the shifters, all in the main loop.However, I'm stuck on step 2. This is where I want to scan all 18 ADC channels automatically and use the DMA to copy the 18 values into RAM. Then I use the CPU to copy the data from there and into my data structure, update the mux/shift registers, and finally, trigger the ADC again. How do I start going about this?Thanks

author: ledtester
author_rank: Super Contributor
timestamp: May 04, 2021, 11:52:03 pm
content: QuoteMy understanding of the Teensy ADCs is that there are at most two units each of which can make a reading from one of the 18 IO pins. Each ADC conversion takes some number of microseconds (like 5 or 10) to complete.ThestartContinuousmethod will start continuous ADC readings from a single IO pin. It doesn't look like the ADC library provides a way to sequence through the IO pins automatically.You can be notified via an interrupt when a conversion is complete. In the interrupt routine you would read and store the result of the completed conversion and have the ADC start a new conversion using the next IO pin.The "conversionSpeed.ino" example in the ADC library has an example of using theenableInterruptsmethod.https://github.com/pedvide/ADC/blob/master/examples/conversionSpeed/conversionSpeed.ino
Help on making a display to work - Page 1
Forum section: electronics / general

author: vaualbus
author_rank: Frequent Contributor
timestamp: January 15, 2021, 09:26:26 pm
content: For a university project I have to use the following display module: 4DLCD-35480320-CTP. I have already write the code to init it, following the one in the datasheet but I really can't understand why it does not work at all. The only thing I got is a white screen. The screen is wired correctly. I'm using an STM32L496 micro running at 80Mhz.Below I attach the code I wrote please if any can review and try to figured out the problem I would be so gratefully I really run out of idea and I have already buy a new one in case mine was broke.Below I attach two version I made both are not working. I'm also attaching the datasheetI know it's not good to ask for "code" but this time I really have no idea where to goThis init code will be go into a larger code base but I wanna modularize it into a single header file.Best regards,Alberto

author: zulunation
author_rank: Contributor
timestamp: January 16, 2021, 08:25:04 am
content: You should follow general steps working with any devices connected to microcontrollers.First check if you can read id of the lcd screen. If so it is likely not broken.If you can't read id. Check schematics and timing diagram with logic analyzer.If you able to read id. Read carefully datasheet on initialization sequence. AN check timing diagram again.

author: madires
author_rank: Super Contributor
timestamp: January 16, 2021, 04:45:39 pm
content: Several LCD driver libs support the ILI9488. Check out what they do and compare that with your code. Another example is the ILI9488 driver for the Transistortester m-firmware (ATmega) I've written (https://github.com/madires/Transistortester-Warehouse/tree/master/Firmware/m-firmware).

author: vaualbus
author_rank: Frequent Contributor
timestamp: May 01, 2021, 10:44:55 pm
content: You wanna now what had happened since?The datasheet was wrong and the SCK was swapped with the DC pin in the provided schematics so yeah I guess there were reasons for which it won't work....The story is even silly... Because the original datasheet present on the mouser/digikey/ecc have the pin wrong in all the places.The updated datasheet that I obtained, when I ask for support, had in the connector schematics the correct pinout but the default schematics was still wrong.So basically I was doomed to fail at the start.Once I found the problem, and they update the datasheet than, and a new board was made it worked first tryAt least as I thought the code was right ahahIt's so funny what happens to me
Doubt in comparison routine - Page 1
Forum section: electronics / general

author: aless2056
author_rank: Contributor
timestamp: May 06, 2021, 01:49:06 am
content: Doubt in comparison routineGuys, I'm being beaten up to do the following asm routine for pic 16F877.I have A and B, both range from 0 to 100 and I would like to do the following routineIf A = B, ok don't do anything in CIf A+5 > B, increase CIf A-5 < B, decrease C

author: ledtester
author_rank: Super Contributor
timestamp: May 06, 2021, 02:24:41 am
content: QuoteAre these cases supposed to be mutually exclusive because if, for instance, B = 10, A = 9 then what are you supposed to do with C?

author: DrG
author_rank: Super Contributor
timestamp: May 06, 2021, 02:34:42 am
content: Quote from: ledtester on May 06, 2021, 02:24:41 amI'm reading it such the solution in C would be something like:if(A<>B){if(A+5>B){C++;}else if (A-5<B){C--;}}I see that he wants asm code but I am too lazy to do someone else's homework, at least not until I see what they have tried first - actually whether it is homework or not.

author: aless2056
author_rank: Contributor
timestamp: May 06, 2021, 02:38:16 am
content: I only want to increase or decrease C if the difference between A and B is 5 for one side or for the other side.A = 50...B = 44, increment CB = 45, increment CB = 46, do nothing...B = 56, decrease CB = 55, decrease CB = 54, do nothing

author: DrG
author_rank: Super Contributor
timestamp: May 06, 2021, 02:51:46 am
content: So what code do you have so far?

author: ledtester
author_rank: Super Contributor
timestamp: May 06, 2021, 02:56:04 am
content: So it seems you want:- if B <= A-5, increment C- if B >= A+5, decrement C- otherwise do nothingHere are some general ideas:- using the SUBWF you can subtract two values, e.g. SUBWF f,d which computes W - f.- if the Z bit is set then the result of the subtraction was 0- if the high bit of the result is set then the result was negative, else it was positive- if the carry bit is set then W <= f, otherwise W > f (as 8-bit unsigned numbers)See page 220 ofhttp://ww1.microchip.com/downloads/en/DeviceDoc/40001262F.pdf
Doubt in the rotation asm pic16F - Page 1
Forum section: electronics / general

author: aless2056
author_rank: Contributor
timestamp: April 28, 2021, 11:33:42 pm
content: Guys, I'm a beginner and I'm in doubt in the RRF Rotation instruction. Assuming I have this value0000 0011 0011 1100AH = 0000 0011AL = 0011 1100Did I do that?RRF AH, FRRF AL, FRRF AH, FRRF AL, FWill the result be?AH = 0000 0000AL = 1100 1111

author: Ian.M
author_rank: Super Contributor
timestamp: April 28, 2021, 11:47:37 pm
content: Only if you are lucky!The midrange (PIC16) family rotate instructions are 9 bit rotates, through 8 bits of register (file register or W) and the carry flag of the STATUS register. Therefore, to get a predictable result you need to preset the carry flag to the value you want as the high bit after the rotate operation.Try:Code:; 16 bit shit rightBCF STATUS, CRRF AH, FRRF AL, FIf you actually want a 16 bit (not 17bit) rotate right rather than a shift right, after the above you need to fixup the high bit with:Code:BTFSC STATUS, CBSF AH, 7which copies the old LSB fom C to to the MSB. It doesn't need to clear the MSB as that was already done by clearing C before the rotates.

author: Dabbot
author_rank: Regular Contributor
timestamp: April 29, 2021, 01:32:34 am
content: Or even better:RRF AL, W ; Copy lsb to carryRRF AH, FRRF AL, F

author: Ian.M
author_rank: Super Contributor
timestamp: April 29, 2021, 03:32:22 am
content: Yep. If you haven't got anything important in W, so can smash it, that's obviously preferable.
SAM Timer Counter for Control Applications (TCC) - recoverable error config. - Page 1
Forum section: electronics / general

author: Miyuki
author_rank: Frequent Contributor
timestamp: April 28, 2021, 12:29:17 pm
content: Hi folks.Do you have some experience with TCC timer in SAM MCUs and the feature of a recoverable error (connected to event from AC)?I want PWM with cycle based current limit. It shall have all I need for it. Just That datasheet is confusing.Faultn Keeper bit in Recoverable Faultn Configuration register (FCTRLn.KEEP). Part is clear.But they operate with Fault Input A and B.And tell: Fault inputsThe first two channel input events (MC0 and TCCxMC1) can be used as Fault A and Fault B inputs respectively.Event system channel connected to these fault inputs must be configured as asynchronous. In two ramp (RAMP2,RAMP2A) operation.So does that mean if I connect event output to Match/Compare it will be then Fault signal if TCC is in PWM mode?And also why they are talking about RAMP2 when in the figure just under this they have RAMP1 used?

author: ataradov
author_rank: Super Contributor
timestamp: April 28, 2021, 04:42:59 pm
content: I have not worked with faults specifically, so can't help directly. But I worked with TCCs quite a bit.Events become a fault input if you configure them in FCTRLA and FCTRLB as a source.I'm not sure what specific figure you are talking about.
How I got the template for Gigadevice GD32E103xx to work in Keil MDK-Lite - Page 1
Forum section: electronics / general

author: crosswick
author_rank: Newbie
timestamp: April 26, 2021, 11:21:22 am
content: Hi all,I thought this was worth sharing. With Keil uVision v5.34 installed, and the 1.20 Addon pack installed within that, I could not get the template (from the 1.20 Firmware Library, all from gigadevice.com) working - it kept giving an error message, and I could not change the Device setting.Turns out the way to remedy it is to select: Project - Manage - Migrate to Version 5 FormatThen the Device (in Options for Target) is selectable and the right Programming Algorithm for downloading to the MCU is available.Hope this helps anyone.

author: techman-001
author_rank: Frequent Contributor
timestamp: April 26, 2021, 10:16:32 pm
content: Quote from: crosswick on April 26, 2021, 11:21:22 amVery interesting.The M4 Gigadevice GD32E103xx LQFP48 package pin-outs are identical to the STM32F103 M3 LQFP48 package as used in the Blue Pill.https://ipfs-pin.com/ipfs/QmXch2TPefJHeacsKRhfq2gmFsyMAsAXEZ5XASHPi19xtV/GD32E103xx_Datasheet_Rev1.8.pdfhttps://ipfs-pin.com/ipfs/QmUFdBU9Lvq3S6hesWy8LrzCm67zHLETyptZ9nGsobrFfP/GD32E10x_User_Manual_Rev1.5.pdf

author: crosswick
author_rank: Newbie
timestamp: April 27, 2021, 08:18:27 pm
content: In the meantime I'm reading in the firmware documentation that the examples are intended to be used in uVision 4, so that's why.
STM32L0 Recognized as in DFU mode instead of USB HID - Page 1
Forum section: electronics / general

author: obsoletepower
author_rank: Contributor
timestamp: April 14, 2021, 07:03:02 pm
content: Hello everyone,I have been a lurker on these forums for a long time now and haven't posted in a long time but I am hoping somebody can assist me with an issue I am having in trying to build a USB keyboard using the STM32L082KZ for my Apollo DSKY.I am trying to get the MCU to be recognized by my PC as a HID but even flashing the default the usbd_hid.c and usbd_hid.h files that get generated will not get it to show up as a HID. Instead, the PC sees it as an "STM32 BOOTLOADER" and Device Manager shows it as "STM Device in DFU Mode". I have been pulling out my hair trying to get this working so any help will be greatly appreciated. I have uploaded my PCB schematic as well as the configuration in CubeMX for reference.The PCB schematic:- U1 is the STM32- U2 is a solid-state relay to turn on the LEDs for key backlight- U3 is a 5V to 3.3V linear regulator- J1 is the Micro USB 2.0 port- J2 is 4-pin header for programming/debuggingNote that I am using the STM32L0's internal oscillator; I hope this isn't the issueThe STM32CubeMX pin configuration:The clock configuration:From a hardware standpoint, the PCB is getting power and I know the MCU is working because when I connect a USB cable to my PCB it shows it as an "STM32 BOOTLOADER" in Devices and Printers.

author: profdc9
author_rank: Frequent Contributor
timestamp: April 14, 2021, 09:09:44 pm
content: Pull BOOT0 low with a 100k resistor. BOOT0 needs to be set on startup.

author: obsoletepower
author_rank: Contributor
timestamp: April 14, 2021, 10:45:22 pm
content: Oh my word!!! I added the bodge 100K and it works now! How the heck did I miss this??I appreciate your help very very much!! I owe you a few beers!

author: technix
author_rank: Super Contributor
timestamp: April 27, 2021, 02:36:52 am
content: Another way if possible at all - you can use option bytes to disable BOOT0 pin entirely if there is one such bit available, and thus no bodge needed. (Since I have no use with BOOT0 on my projects, a lot of my projects have BOOT0 entirely fused off that way.)
Did I actually find a defective STM32? - Page 1
Forum section: electronics / general

author: mck1117
author_rank: Contributor
timestamp: April 15, 2021, 12:53:20 am
content: STM32F427VGT6. Should be 1MB flash, right?Then what's up with this?Mass erase: works, erases sectors 0-11Write: works, can write to full 1MBSingle sector erase: doesn't work, either stlink or from firmware running on the device (see attached).What's going on with this MCU? Other identical MCUs on identical boards work just fine. Is this a b-grade QC-fail chip that JLCPCB sold me anyway?

author: wraper
author_rank: Unknown
timestamp: April 15, 2021, 01:02:19 am
content: Are other identical MCUs from the same batch? Are markings and package exactly the same?

author: AndyC_772
author_rank: Super Contributor
timestamp: April 15, 2021, 09:59:34 am
content: Check option bytes. Is that sector write protected?

author: mck1117
author_rank: Contributor
timestamp: April 15, 2021, 06:23:46 pm
content: Nope, I even tried write protecting then un-protecting every sector in case it was a dodgy option byte. And it's not just sector 11 - it's the last 4 sectors, top 512K, the ones that would be absent on a 512k part.

author: mck1117
author_rank: Contributor
timestamp: April 15, 2021, 06:38:29 pm
content: Quote from: wraper on April 15, 2021, 01:02:19 amYep, the markings perfectly match other 427VGT from the same and other batches.

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 15, 2021, 06:50:32 pm
content: I woudl ask such technical question in ST's site:http://community.st.comProbably someone had the same issue.

author: wraper
author_rank: Unknown
timestamp: April 15, 2021, 07:06:06 pm
content: Could be some obscure issue not caught by automated testing during production.

author: AndyC_772
author_rank: Super Contributor
timestamp: April 15, 2021, 07:06:56 pm
content: Quote from: mck1117 on April 15, 2021, 06:23:46 pmYou might be surprised just how absent they aren't...!I've certainly found perfectly good flash memory where it shouldn't exist on smaller STM32 parts - just don't rely on it being there or working.If I were you I'd just swap the chip and forget about it. If the fault happens again, then investigate.

author: mck1117
author_rank: Contributor
timestamp: April 15, 2021, 08:39:42 pm
content: Quote from: AndyC_772 on April 15, 2021, 07:06:56 pmYes - I'm aware that sometimes the higher flash parts are down-binned as smaller ones, but the surprising part here is that the flashsort ofworks, but the "how big am I" register still reports 1MB.Quote from: AndyC_772 on April 15, 2021, 07:06:56 pmYep, chip already replaced, and this is the only one I've ever seen like this.

author: technix
author_rank: Super Contributor
timestamp: April 27, 2021, 02:31:18 am
content: OTOH I think this is still a perfectly good STM32F427VET6 then?