hybridfree/eevblog-posts huggingface dataset:
EEPROM 24LC32 dynamic addressing question - Page 1
Forum section: electronics / general

author: kile
author_rank: Contributor
timestamp: June 11, 2020, 07:13:50 am
content: I have a 24LC32 EEPROM and I want to be able to change its address during operation. I know I can change the state of the A0, A1 and A2 pins to change the I2C address that the device listens to. But can I do that after the the EEPROM has been powered up? Will the EEPROM internally change the I2C address it is listening to, if I change the state of the address pins with a microcontroller?In other words: does the EEPROM read the address on power up and then uses that address until the next power cycle regardless of the state of the A0-A2 pins, or will it dynamically change its address during operation based on the state of the A0-A2 pins?I need this because I have an FV-1 DSP chip which reads its programs from the EEPROM through I2C. The DSP chip can read a max of 8 programs. My system also has a microcontroller and I want to be able to increase the number of programs that the DSP chip can access by having the basic 8 programs on the EEPROM, but having additional programs in the flash of the microcontroller.Thanks for help!

author: ataradov
author_rank: Super Contributor
timestamp: June 11, 2020, 07:39:55 am
content: Why even bother with EEPROM? Just emulate EEPROM from the MCU and have it respond with whatever data you like.

author: kile
author_rank: Contributor
timestamp: June 11, 2020, 08:32:52 am
content: Yes, that would work for sure. But I want to have an option to have a physical EEPROM as a backup, and I want to be able to write programs to the EEPROM from the MCU.

author: mikerj
author_rank: Super Contributor
timestamp: June 11, 2020, 11:24:19 am
content: Not something I've ever tried but I've never seen anything in serial EEPROM datasheets to suggest the address pin values are latched at power on. This should be pretty easy to prove if you already have a working system, lift an address pin and run a few wires to a toggle switch to change the address after it's powered on.

author: ataradov
author_rank: Super Contributor
timestamp: June 11, 2020, 04:17:48 pm
content: The issue is that if it is not specified, it might be different from device to device. So you would have to stick with a single device supplier, or evaluate each device individually before substituting.
HEDS-5500:: weird index? - Page 1
Forum section: electronics / general

author: 0db
author_rank: Frequent Contributor
timestamp: June 07, 2020, 03:07:18 pm
content: so a collegue gave me yesterday an ARM board (probably derived from Odrive?) which has the HEDS-5500 incremental encoder, and asked me to give an eye to it because apparently the firmware doesn't work correctly.The first thing I did this mornign was attaching the incremental encoder to a LA, to have a look.The HEDS-5500 has three signals- channel A- channel B- indexThe index output is a 90 electrical degree, high true index pulse which is generated once for each full rotation of the codewheel.But ... look at the screenshot: the index signal is always equal to channel B ... I wonder why?!?I have already tried two of these encoders. Always the same result.

author: dmendesf
author_rank: Frequent Contributor
timestamp: June 07, 2020, 04:31:48 pm
content: From the datasheet:For the HEDS-5500 and HEDM-5500, Pin #2 is a No Connect.For the HEDS-5540 and HEDM-5540, Pin #2 is CH. I, the index output

author: 0db
author_rank: Frequent Contributor
timestamp: June 07, 2020, 04:46:14 pm
content: No connect, but there is a signal on that pin #2. A copy of the channel B.I think someone must have shipped the wrong couple of encoders with the kit.

author: dmendesf
author_rank: Frequent Contributor
timestamp: June 07, 2020, 08:34:21 pm
content: Seems so. "No connect" isn't the same as "not connected"...

author: H.O
author_rank: Frequent Contributor
timestamp: June 08, 2020, 08:33:33 am
content: And you are sure the signal is actually there, it's not crosstalk between channels on the LA due to the index channel actually floating?

author: 0db
author_rank: Frequent Contributor
timestamp: June 08, 2020, 09:12:31 am
content: Quote from: H.O on June 08, 2020, 08:33:33 amYes, it's really there, on the 4th channel of the LA. I see it even if I remove both the ChA and ChB of the encoder.And since it's really there, this was the reason why the Odrive controller didn't work: because in autocalibration mode it assumed the encoder had an index, since the firmware actually saw some signal on the Pin#2.
esp32-d0wd pcb can't connect - Page 1
Forum section: electronics / general

author: anfractuosity
author_rank: Contributor
timestamp: June 13, 2020, 10:45:05 am
content: Hi,I'm just wondering, if anyone might be able to give me any suggestions for the attached circuit.I've just had a PCB made, which I've now got, which is failing to connect with esptool, I get 'Timed out waiting for packet header'I noticed I didn't have a pullup on GPIO0 which I've now added, but I still get the same issue alas.I've measure the voltages from the transistors attached to RTS and DTR, and with the pull up, they appear to give the same desired voltagesas what is mentioned in the esptool.py source code.I also tried holding a 10uF cap against EN and GND, to no avail, while running esptool.The pcb photo is before adding the bodge pullup resistor for GPIO0Any pointers would be much appreciated!The following is the code I created and measured the voltages of en and gpio0, with the bodge resistor in place:Code:#!/usr/bin/python3import timeimport structimport serialser = serial.Serial('/dev/ttyUSB0',baudrate=115200,timeout=None) # open serial portwhile True:ser.dtr = Trueser.rts = True# gpio=3.3 en=3.3#while True:# ser.dtr = False# ser.rts = True# gpio = 3,3 en = 0#while True:# ser.dtr = True# ser.rts = False# gpio = 0 en = 3.3V#while True:# ser.dtr = False# ser.rts = False# gpio = 3.3 en = 3.3I'm wondering if it's correct that if both dtr & rts are false or true, that gpio is 3.3 and en is 3.3V?I just measured :The tx pin of the esp32 seems to always remain = 3.3Vvddsdio pin of the esp32 seems to remain = 0V (which I believe means it's not booting?)

author: JustMeHere
author_rank: Frequent Contributor
timestamp: June 19, 2020, 02:31:58 am
content: Have you probed the board with a scope to see if there any activity on TX when it comes out of reset?

author: anfractuosity
author_rank: Contributor
timestamp: June 19, 2020, 06:40:22 pm
content: I have spent quite a while checking over the footprints and orientation, but will look at this again.From what I can tell the TX remains high constantly, but will have another look.

author: anfractuosity
author_rank: Contributor
timestamp: June 20, 2020, 07:40:56 am
content: blueskull - Thank you so much! Doh! Can't believe I didn't spot this before.
Username and Password for STM32 webserver - Page 1
Forum section: electronics / general

author: rcbuck
author_rank: Frequent Contributor
timestamp: June 03, 2020, 03:31:25 am
content: Can someone make a suggestion or reference to the best way to require a username and password for a website running on a STM32F407 board? The website is working fine but I want to restrict access. I'm not overly concerned about security, just access.

author: nuclearcat
author_rank: Unknown
timestamp: June 03, 2020, 04:43:52 am
content: You have 2 ways:1)Check in coming request for Authorization header, if present, decode base64, verify (its user:pass pair), then on result, send HTTP 401 or process request.2)Check for secret "cookie" from request, if not present - serve only specific trivial(static) page, where javascript give option to set this cookie. You can generate it as hash from user/pass.3)Make secret prefix for all files, e.g.http://192.168.0.123/secretprefix/anyfile.htmland verify if it is present. This is not exactly username password, but still...(All mentioned ways dead insecure, but as you required...)

author: ejeffrey
author_rank: Super Contributor
timestamp: June 03, 2020, 05:45:48 am
content: Don't. Put it on a private network segment and run a reverse proxy on a separate computer with authentication. A raspberry pi is more than sufficient.

author: rcbuck
author_rank: Frequent Contributor
timestamp: June 03, 2020, 03:34:22 pm
content: Thanks nuclearcat, option 1 is probably the way to do it. Simple and it works.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 03, 2020, 09:48:34 pm
content: A quick search for "ESP32" together with "SSL" bings up several websites discussing https.Almost every uC is programmed in C / C++ nowaday's, so the important stuff should be easy to port (if it has not been done yet).

author: hamster_nz
author_rank: Super Contributor
timestamp: June 05, 2020, 07:23:36 am
content: I have recently had to deal with this while writing a https server with authentication from scratch in C.Can supply advice and maybe even source on how to decoded the base64 encoded authentication headers.PM me if interested....
STM32 PWM not PWMing :*( - Page 1
Forum section: electronics / general

author: cart
author_rank: Contributor
timestamp: June 02, 2020, 08:01:48 pm
content: Hey everyone.I have an STM32F401RE board and I have an LED from pin PB6 to GND.In the same project that this snippet code below comes from I have a PWM running on PA5 pin and it is blinking.I have been at this all night and I can't figure out why PB6 is not blinking with the PWM. Here is the code.I hope anybody can see something wrong cause if not then I really don't know what to do : /Code:void step_init(){RCC->AHB1ENR |= (1 << 2); //Enable clock access to port BGPIOB->AFR |= (1<<25); //Set PB6 for TIM5GPIOB->MODER |= (1<<13); //Sets oub PB6 for alternate functions//Timer SetupRCC->APB1ENR |= (1<<3); //Enables Timer5TIM5->PSC = 1600-1; //Prescaker of 1600TIM5->ARR = 10000; //Reload at 10000 countsTIM5->CNT = 0; //TIM5->CCMR1 = 0b1100100; //OC1M PWM Mode1 and Output compare 1 preload enable//TIM5->CCMR1 = 0x0060; // Enable PWM mode //1100000TIM5->CCER |= 1; //Enable PWM ch1TIM5->CCR1 = 5000; //50%DCTIM5->CR1 |= 1; //EnableTIM5->EGR |= 1;};

author: newbrain
author_rank: Super Contributor
timestamp: June 03, 2020, 10:13:34 am
content: Did not check all the code, but you are setting up TIM5.PB6 alternate function 0010 is TIM4_CH1.TIM5 channels 1 to 4 are available on PA 0 to 3.
SAMD51 selfmain.c samd51j19a_self.ld - Page 1
Forum section: electronics / general

author: spersels
author_rank: Newbie
timestamp: May 30, 2020, 01:45:04 am
content: Working to understand how ARM bootloaders work by doing a bit of perusing the uf2-samdx1 bootloader code.I see a couple of files selfmain.c and samd51j19a_self.ld that I'm confused what they are used for. They seem to have corresponding files main.c and samd51j19a.ld and have similar content.Can someone shed some light on the purpose for these files?Thanks,Shawn

author: westfw
author_rank: Super Contributor
timestamp: May 30, 2020, 04:36:43 am
content: I think one has main for a self-programming thing, and one had the normal mail.I have no idea what the difference is, or what they do.The .ld file is a linker script. You might figure out something from comparing it to the non-self linker script. It defines some extra memory sections:Code:Regular:- rom (rx) : ORIGIN = 0x00000000, LENGTH = 16K- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K_Self version:+ rom (rx) : ORIGIN = 0x00004000, LENGTH = 0x00080000 - 0x4000+ ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000+ bkupram (rwx) : ORIGIN = 0x47000000, LENGTH = 0x00002000+ qspi (rwx) : ORIGIN = 0x04000000, LENGTH = 0x01000000main.c says it contains the SAM-BA code (which is the Atmel Bootloader.) selfmain.c is entirely different? Note the different start addresses for ROM.As a guess, the chip winds up with two bootloaders - the normal SAM-BA bootloader that starts first, and later in rom the UF2 (disk emulating) bootloader - that's consistent with the way the Adafruit SAMD51 boards behave.
Toshiba TC9525F Datasheet - Page 1
Forum section: electronics / general

author: Tom83_Elec
author_rank: Newbie
timestamp: May 22, 2020, 07:41:07 pm
content: Hello!,i'm searching for a datasheet for the Toshiba TC9525F. - It is a crystal liquid display driver.I can't find anything on the internet, except an image and a sheet with a short overview.https://a.d-cd.net/uAAAAgCWvOA-960.jpghttps://www.datasheets360.com/pdf/2457033448783172233Does anyone know this ic?
Help to improve PICKitPlus - Page 1
Forum section: electronics / general

author: Anobium
author_rank: Regular Contributor
timestamp: May 20, 2020, 04:10:27 pm
content: An offer.If anyone has a PICKit2 or PICKit3 device database where you have added devices, PIC or other, send the updated database to me. If we add a new part from your database then we will provide a license for PICKitPlus.See herehttps://github.com/Anobium/PICKitPlus/tree/master/KnownPartsDatabasesfor the known parts plushttps://github.com/Anobium/PICKitPlus/blob/master/README.mdfor the latest database listing.Let me know if you have added any additional parts - ping meEvan

author: cdev
author_rank: Super Contributor
timestamp: May 20, 2020, 04:14:14 pm
content: What are your favorite resources for beginners learning PIC?

author: Anobium
author_rank: Regular Contributor
timestamp: May 20, 2020, 05:12:50 pm
content: What are my favorite...Are you are asking why I should post 'the ask'? Hunting around Google is not the way to go for the PICKit device database. We have spent nearly three years improving the quality of the PICKit device database. We receive PICKit device database updates from our users and we incorporate these updates and then publish for all to use - not just PICKitPlus users. I hope that some users are willing to share to increase the number of parts supported and further improve the quality.Regarding learning resources - what do I advise? Trello ... where I have defined a training course for others - currently, been tested in Greece. I have also recently release 21 training videos on YouTube.But, my best resource? It is Microchip. They have given both of the projects great support. I am co-developer of Great Cow BASIC and lead developer on PICKitPlus. Microchip provide resources in terms of access to the 8-bit business unit, direct 3rd level support, incident support and product support. Always very grateful.I do give back resources to share. Seehttps://github.com/Anobium/Great-Cow-BASIC-Demonstration-Sources- this is just over 1400 example programs for 8-bit PICs and AVRs. They are updated and managed as we progress. My other gits are there also - specifically there is a PICKitPlus git where I share the current PICKitPlus parts database with all the older versions and resources.I hope this gives you some insights.Evan

author: cdev
author_rank: Super Contributor
timestamp: May 22, 2020, 12:31:45 am
content: Thank you! I just downloaded your repository and am looking through it.Quote from: Anobium on May 20, 2020, 05:12:50 pm
Getting the program out of Lattice ispMACH LC 4032V - Page 1
Forum section: electronics / general

author: egorblack
author_rank: Newbie
timestamp: May 04, 2020, 06:57:27 pm
content: Hello.I never touched CPLDs before, but ...Basically, I have a device with 4032V burned down.Also, I have the same device in working condition.So, I bought new 4032V, and HW-USBN-2B cable.Tried to use Diamond programmer to pull program out,but could not find a way to do it.Please, let me know the right way to do it.Thank You.

author: up8051
author_rank: Frequent Contributor
timestamp: May 04, 2020, 07:16:59 pm
content: ispMACH 4000 is supported by ispLeverClassic.ispMACH have security bit:Security BitA programmable security bit is provided on the ispMACH 4000 devices as a deterrent to unauthorized copying ofthe array configuration patterns. Once programmed, this bit defeats readback of the programmed pattern by adevice programmer, securing proprietary designs from competitors. Programming and verification are alsodefeated by the security bit. The bit can only be reset by erasing the entire device.

author: egorblack
author_rank: Newbie
timestamp: May 04, 2020, 07:43:24 pm
content: I can not even see if security bit is set or not with Diamond .Which one am I suppose to use ?ispLEVER_Classic_Base_2_0 or ispLEVER_Classic_FPGA_2_0 ??

author: up8051
author_rank: Frequent Contributor
timestamp: May 04, 2020, 08:15:03 pm
content: ispLEVER_Classic_Base_2_0

author: egorblack
author_rank: Newbie
timestamp: May 13, 2020, 05:34:31 pm
content: I finally installed it(after fighting with usb drivers). It has couple applications, but none of them have option to read the chip, only writing available.Is it any chance anybody can point me in right direction to actually read the program from chip?Thank you.

author: up8051
author_rank: Frequent Contributor
timestamp: May 20, 2020, 06:44:12 pm
content: You must do something wrong.I run old ispVM System and I can set operation"Read and Save JEDEC"
PICkitPlus with MPLAB-X IDE - simple - Page 1
Forum section: electronics / general

author: Anobium
author_rank: Regular Contributor
timestamp: May 20, 2020, 11:03:25 am
content: Using a PICkit2, or PICKit3, with MPLAB-IDE works very nicely with PICKitPlus.I am sure lots of you know the method, but, now you can use a PICkit2, or PICKit3 programmer with MPLAB-IDE.With PICKitPlus you get support for PICKit2 and you can program those new PICs. The newer PICs that are not supported by MPLAB-X or MPLAB-IPE programming using a PICkit2 programmer include:16(L)F15xxx16(L)F18xxx16(L)F19xxx18(L)FxxK4018(L)FxxK4218(L)FxxK8318(L)FxxQ1018(L)FxxQ43PICKitPlus enables the use the PICkit2 programmer within MPLAB-X to programmer, avoids the horrid changing of the PICkit3 firmware, and, supports those newer PICS. PICKitPlus is very easy to integrate into MPLAB-X which means you leverage your current investment in your programmers.I have posted a short YouTube video but essentially this works by checking one box and inserting a command string. Seehttp://youtu.be/PNUweZb1ofsEnjoyFor PICKitPlus software seewww.pickitplus.co.uk

author: hexreader
author_rank: Frequent Contributor
timestamp: May 20, 2020, 11:59:51 am
content: Link does not work (error 404), which is lucky because:Entering web site manually causes my antivirus software to warn of attempt to gain personal or credit card information.I am in no way internet "street wise", so maybe I am over-worrying.Is this an unsafe site? ... or is windows defender over-zealous?I suggest caution unless and until the site is deemed safe.

author: Anobium
author_rank: Regular Contributor
timestamp: May 20, 2020, 01:57:28 pm
content: Sorry, there was an error when I created the post.www.pickitplus.co.ukis NOT scamming. We have worked for over two years to improved and enhance the PICKitPlus software. :-)Really sorry for the bad URL but the post editor added ...https://www.eevblog.com/forum/as the prefix to thewww.pickitplus.co.ukURL. I have corrected.

author: hexreader
author_rank: Frequent Contributor
timestamp: May 20, 2020, 02:00:18 pm
content: Yes, that all works OK nowThanks for fixing it

author: Anobium
author_rank: Regular Contributor
timestamp: May 20, 2020, 02:04:59 pm
content: I saw the URL in the post and did not spot the suffix!So bad of me. So, worrying. :-)

author: hexreader
author_rank: Frequent Contributor
timestamp: May 20, 2020, 02:28:16 pm
content: Apologies for:1) Panicking and jumping to poor conclusions.2) Being overly blunt.Having researched PICkitPlus further, I see it has a distinguished history, and looks like an excellent product.Would be nice to return fully to PICkit2 one day. I still use it for older PICs.

author: Anobium
author_rank: Regular Contributor
timestamp: May 20, 2020, 03:52:14 pm
content: No problem.
STM32F0 - Error: Data read failed - Page 1
Forum section: electronics / general

author: panoss
author_rank: Frequent Contributor
timestamp: May 18, 2020, 06:41:42 am
content: I have an STM32F030K6T6, I 've made a custom board.I 'm using STM32CubeProgrammer with ST-Link V2.I click 'connect' and I get this error: 'Error: Data read failed'It gets connected to the MCU, the program reads correctly it's ID.I have checked all related connections: SWCLK, SWDIO, RST, 3V3 and GND. (I 'm not using the SWIM).Everything looks ok.I 've tried both options of BOOT0 (grounded & pulled up to 3V3).So what might be the problem? A damaged MCU? (maybe I overheated it during soldering)And if it 's damaged how does it get recognized by the STM32CubeProgrammer?

author: thm_w
author_rank: Super Contributor
timestamp: May 19, 2020, 08:54:10 pm
content: 3.3V is supplied to the board by the stlink or is it being generated locally? Have you checked the supply is stable enough?Look at the pins under a microscope if you can.Check signals with an oscilloscope during probing.Very unlikely it was overheated during soldering unless you used hot air set to 400C for a long time.

author: pigrew
author_rank: Frequent Contributor
timestamp: May 19, 2020, 10:40:53 pm
content: Theone mention of this errorI found online was where the "security" bits were set to make the device read-only.I'd suggest re-checking a few of the silly minor things: Is the st-link firmware updated? Are all the Vdd and Vbat and Vdda connected to 3.3V? Is your linker script correct for the F030 (i.e., is the memory mapped to the wrong location)? Do they have decoupling caps near the pins?STM32CubeProgrammer or ST-Link utility might be helpful for debugging the connection issues. Check if the security bits are set? Try erasing the device in CubeProgrammer?If you post your schematics, then we might be able to see other issues.But, yeah... replacing the IC might be a good thing to try.

author: panoss
author_rank: Frequent Contributor
timestamp: May 20, 2020, 10:05:08 am
content: I replaced the IC (works fine with the new one) as this was the less time consuming action I could take.Though I will try your suggestions in another board with this IC.
PIC32MZ PPS Pins - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: May 18, 2020, 11:04:28 pm
content: Hi,first time using Microchip's PPS remapping (for two separate projects & micros). Some of you explained how it works in a previous post but I want to make sure I understand it correctly because I am laying out a PCB.With reference to the attached screenshot, am I correct in saying that using a 100:- OC3 and OC6 (for example) can be mappedTO ANYof the pins in the first block (circled in red)AND ONLY TO THOSE- U5TX and SDO2 (again just for example) can be mappedTO ANYof the pins in the second block (circled in green)AND ONLY TO THOSE- SDO6 can be mappedTO ANYof the pins in the third block (circled in blue)AND ONLY TO THOSEMany thanks

author: Ash
author_rank: Regular Contributor
timestamp: May 19, 2020, 03:58:07 am
content: Hi,Yes, that is right. You should probably prototype to verify. Also, if you have the room, add extra "test point" pads to the other pins and if you get into trouble you can at least jumper stuff around on the PCB by cutting tracks and using bodge wires.Have you read the errata for your chips? In some devices there are issues with some peripheral (I2C is one I believe) make sure you are using the ones that work.Good LuckAsh.

author: JPortici
author_rank: Super Contributor
timestamp: May 19, 2020, 05:05:02 am
content: Hi, PPS in the PIC32MZ works very differently than in the 16 or 8bit pics, in which you have much more freedom.. complete freedom in the dsPIC33C, anything can go anywhere with no restrictions on port or direction..It can become convoluted and you CAN lose track of things very quicklyIt's probably the only time you'll hear me say it but harmony can help to visualize things.. a standalone pin planner has been on my to do list since foreverwith these device i print the device pinout and start noting which pin do what and see which peripheral instance i have to use to mantain a coherent pinout.. it can become very tedious after the 5th or 6th trybut to answer your question, you got it!
STM32F1 PC13 LED - Page 1
Forum section: electronics / general

author: ipek.grgc
author_rank: Contributor
timestamp: May 15, 2020, 01:47:38 pm
content: Hello everyone, hope you are doing okay.In STM32F103C8's datasheet, Rev 17 page 33, it says:" PC13, PC14 and PC15 are supplied through the power switch. Since the switch only sinks a limited amount of current (3 mA), the use of GPIOs PC13 to PC15 in output mode is limited: the speed should not exceed 2 MHz with a maximum load of 30 pF and these IOsmust not be used as a current source (e.g. to drive an LED). "But, as far as i know, in Blue Pill's design PC13 is driving a LED. How come? I am wondering.Thanks! Be safe.

author: exe
author_rank: Unknown
timestamp: May 15, 2020, 01:57:14 pm
content: Nice catch. I guess this answers it:https://electronics.stackexchange.com/questions/440929/current-sinking-with-pc13-on-stm32f103c8t6.TL;DR: the current supposed to be within the limits if the board is done properly. But I can easily imagine that knock-off clone would violate this.

author: Jeroen3
author_rank: Super Contributor
timestamp: May 15, 2020, 02:25:00 pm
content: Also, in the bluepill schematic PC13 is in sink configuration, not source. I suspect impact of sink is a lot smaller compared to source.

author: exe
author_rank: Unknown
timestamp: May 15, 2020, 08:13:43 pm
content: I think that text from the datasheet is inaccurate. Long below that I found this text:> The GPIOs (general-purpose inputs/outputs) can sink or source up to ±8 mA, and sink orsource up to ±20 mA (with a relaxed VOL/VOH) except PC13, PC14 and PC15 which cansink or source up to +/-3mA.Page 65:https://www.st.com/resource/en/datasheet/stm32f103c8.pdf
Jumping to bootloader from application code on STM32L011 - Page 1
Forum section: electronics / general

author: uer166
author_rank: Super Contributor
timestamp: May 14, 2020, 02:26:59 am
content: I specifically chose a chip with an integrated UART bootloader so I can update a daisy chain string of MCUs without messing with own bootloader or linker scripts. Immediately hit roadblock where I can't seem to jump to the boot/system code, it seems to immediately jump back to application and hit the main() breakpoint. It seems to be a known issue, from the ST bootloader manual:QuoteAfter a bit of disbelief as to what sequence of events caused ST to release this heap of garbage into the mask ROM, I'm trying to find a clean workaround. There are a few ideas floating around like "find a way to pull BOOT0 pin high and reset micro". Is there a clean workaround or am I wasting my time with these? Curious to know if anyone else had same issue here.Alternative question: is there any other easy to use MCU with a hardcoded UART bootloader that comes in a 3x3mm QFN, has a 12-bit ADC, and (optionally) can be powered from 3-4.2 V range.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: May 14, 2020, 08:21:12 am
content: Can you dump that internal ROM (0x1FF00000-0x1FF01FFF) and post it here for study? Perhaps it is possible to jump to serial loader function directly, bypassing the emptiness check.

author: nctnico
author_rank: Super Contributor
timestamp: May 14, 2020, 09:29:59 am
content: AFAIK there is a way to jump to the bootloader on STM32 but it may be device specific. IIRC you have to control the boot line but still there can be issues with configuring the chip; you'll need to reset the UART. I know one of my customers spend a lot of time on this to get it actually to work (send a command to a device to enter the bootloader and then update the firmware).The bootloaders from NXP behave much nicer but still require to set a pin at a logic level to enter the bootloader after a reset.

author: uer166
author_rank: Super Contributor
timestamp: May 14, 2020, 09:17:33 pm
content: I think I'll try the hardware way: tie the BOOT0 pin to GND with a resistor, and add a cap. Also tie it to another GPIO as well. Normally it would be low and it would boot to application since it's tied to GND. And if I want to enter bootloader:Set that GPIO to high, setting the BOOT0 pin to highReset CPU (I assume there's an instruction for that, if not just let the watchdog timeout)The GPIO tied to BOOT0 will be high-Z during reset, but cap would retain enough charge to be seen as high in the bootloader, therefore booting into system ROMI wish the boot0 pin was broken out on the Nucleo boards, but no big deal..

author: uer166
author_rank: Super Contributor
timestamp: May 14, 2020, 09:19:58 pm
content: Quote from: abyrvalg on May 14, 2020, 08:21:12 amI'll try once I get a chance, hope that memory region is not locked from factory and can read with debugger.. It seems to be a hacky way that can have inadvertent failures.
Help with code inverter microcontroller programming - Page 1
Forum section: electronics / general

author: somar1
author_rank: Newbie
timestamp: May 14, 2020, 12:25:46 am
content: HiI have this circuit and it works greatThis scheme on Proteus 8The circuit are feed back from the TransformerThe transformer output coil is 400V and the tension is set to 220V by the variable resistance 100KMy experience is poor in programming the microcontrollers and I want your experiences in the programming codehttps://www.mediafire.com/file/t1izzo2lmrdzakc/sin2.pdsprj/filegreetings to you all
bootloader burn - Page 1
Forum section: electronics / general

author: ranganatennakoon
author_rank: Contributor
timestamp: May 11, 2020, 11:11:04 am
content: I'm plan to make temperature controller. So that some time ago I purchased aesp-07module.My problem is that I need to burn theArduino bootloaderbefore I program this module?thank you !

author: Syntax Error
author_rank: Frequent Contributor
timestamp: May 11, 2020, 01:45:07 pm
content: Plenty of how-to videos on Youtube.Plus this Indestructablehttps://www.instructables.com/id/ESP8266-as-Arduino/
about esp-07 (8266) module ⚡ - Page 1
Forum section: electronics / general

author: ranganatennakoon
author_rank: Contributor
timestamp: May 06, 2020, 12:04:57 pm
content: I have some questions about esp-07 module.1) How do I set a 25 to 35kHz frequency range pwm signalon an ESP-07 ?Can anyone provide an example in arduino environment? It is easy to do with atmega328/1280/2560 but how to do esp? thank you !

author: kripton2035
author_rank: Super Contributor
timestamp: May 06, 2020, 01:02:29 pm
content: PWM frequency is 1kHz by default. Call analogWriteFreq(new_frequency) to change the frequency. Valid values are from 100Hz up to 40000Hz.source :https://arduino-esp8266.readthedocs.io/en/latest/reference.html

author: ranganatennakoon
author_rank: Contributor
timestamp: May 08, 2020, 03:19:01 am
content: thank you very much !
Programming PIC32MZ via SPI / UART (bootloader?) - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: May 06, 2020, 07:15:02 pm
content: Hi,I have a PIC32MZ connected to a Compute Module (Raspberry Pi) via an SPI. The PIC32MZ can only be programmed once at the factory but needs to be remotely updated via the Compute Module. And it needs to be done through the SPI channel.SPI is preferred but if it is not available, I could consider using UART if the code is already available and tested.1) Can it be done and how?2) Is there any code already available? Where?3) On the hardware do I need to add any other connections apart from the SPI bus that provide all code already done and tested?Generally what other methods of remote firmware updating are there?Many thanks

author: TomS_
author_rank: Frequent Contributor
timestamp: May 07, 2020, 08:28:17 am
content: If the PIC acts as a slave to the RPI, you could implement some kind of protocol over SPI that would allow you to send it new firmware.This may need to be done via some kind of bootloader, since you couldn't overwrite the main application while it's running. E.g. you could send a "upload firmware" command which reboots into a boot loader which can then receive the new firmware and overwrite the main program flash.Or you store the new firmware in one half of the program flash (e.g. upper half) from within the application itself, and upon reboot the bootloader checksums both halves and if the two are different (but valid!!) then copy the upper half to the lower half.You could also do something similar over UART.There are example bootloaders floating around, but I find these tend to assume you'll use some kind of program on a PC to upload new firmware over UART. But the basic principles are the same and it's an interesting challenge to implement one yourself, you just make use of the PICs self programming capabilities.
about esp-07 (8266) module ⚡ - Page 1
Forum section: electronics / general

author: ranganatennakoon
author_rank: Contributor
timestamp: May 06, 2020, 11:34:54 am
content: I have some questions about esp-07 module.

author: Simon
author_rank: Unknown
timestamp: May 06, 2020, 05:11:45 pm
content: Double post locked. Please don't do that.
MAX3232 only starts transmitting after switching pins forth-back - Page 1
Forum section: electronics / general

author: sirtet
author_rank: Contributor
timestamp: May 05, 2020, 10:09:13 pm
content: I use a tiny board with the max and capacitors on it, from ebay.It shifts the 3v3 from a trinket M0 board to rs232.I developed an arduino sketch, and all went well as long as i was developing and sending some debug messages through the USB serial.As i wanted to deploy the thing, it did not work anymore without the USB plugged in.The Hardware serial port did not send anything. Probing around, i found that the MAX was not transmitting what the micro sent.By chance, i found a way to reliably get the MAX to transmit: Flicking a switch forth and back again on the 232 serial line, that lets me switch my cable from straight to cross (double 3-pin switch).So i looked at the MAX datasheethttp://www.ti.com/lit/ds/symlink/max3232.pdf?ts=1588711266067and compared it with my max-board.I see a difference in the recommended caps vs. what's on my board:Section 9.2 pages 10/11Recommended for 3v3 are 0.1 μF for C1 to 4Installed differs in one cap: 0.2 μF for C3May that be the problem? I don't have a 100n right at hand to test and swap, and won't be very good at doing it, so i ask first...Why it also works with the USB attached puzzles me. Something EMI i guess...

author: wraper
author_rank: Unknown
timestamp: May 05, 2020, 10:13:42 pm
content: QuoteNo, but it could be caused by the fact that MAX3232 is 100% fake. 0.2uF instead of 0.1uF should not make any difference, at least with genuine IC.

author: sirtet
author_rank: Contributor
timestamp: May 06, 2020, 04:42:56 am
content: Thanks.100%... You mean "for sure"?Are there ways to acknowledge?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 06, 2020, 08:02:42 am
content: You bought it on eBay. Assume counterfeit parts.If you have a microscope, you can identify the chip. Remove the device, heat it slowly until it's just about smoking and kind of rubbery, then carefully peel back the leads and packaging to reveal the silicon die; continue peeling and chipping, while gently pushing and pulling at the chip; it should fall out. Be careful, the die is very brittle, easily chipped or snapped. With luck, the bare die surface is visible; but you will need pretty good magnification to make out anything (usually there's a mfg/pn identifier on there).Fortunately you can buy authentic MAX3232s for cheap (shipping dominates cost). If you have the tools to desolder and replace it, you can do this. Let the time spent be a lesson learned about parts quality and sourcing.Tim

author: sirtet
author_rank: Contributor
timestamp: May 06, 2020, 12:59:11 pm
content: Thanks.So, what i did for now, is i operate the MAX at 5V instead of 3v3.TX from the micro works without level shifting, as it should. 3v3 is in the normal 5V HIGH tolerance band.RX from MAX to micro goes through a 2k2 / 3k9 resistor divider which would give 3.2V without load, close enough.Works for now, though i don't know how close to the edge i live with that set-up...Time will tell if too close or not.
Read P87C51 - Page 1
Forum section: electronics / general

author: koba30
author_rank: Contributor
timestamp: May 18, 2020, 01:00:15 pm
content: Hi,I am using a TL866CSS to read a P87C51, the reading is succefull, the question is: Is this data encrypted?, can be used to programm another uC? How can I check if the code protection is activated?Thanks in advance for you time.

author: Wiljan
author_rank: Regular Contributor
timestamp: May 18, 2020, 01:28:49 pm
content: I recall that a more symmetrical hex pattern normal comes when it's encrypted so I guess it's notIf you program a new chip and put into the board where the old one was and it works you know it not encryptedAlso you could try to dissemble the dump and see if it makes senseI also recall way back the the 8751 can run with external Eprom and some guy did that an output pin did drive the input pin telling to read internal or external.In the external Eprom he had a uart code sending data to external terminal and when start sending he flipped the pin so the dump came from internal Eprom, pretty clever

author: PCB.Wiz
author_rank: Super Contributor
timestamp: May 19, 2020, 01:10:54 am
content: Quote from: koba30 on May 18, 2020, 01:00:15 pmSave the read code to a hex file and run an 8051 disassembler on the hex file, and see if the assembler looks like gibberish...

author: amyk
author_rank: Super Contributor
timestamp: May 19, 2020, 01:48:21 am
content: A protected one will read all FF or 00; that looks like valid '51 machine code to me.

author: wraper
author_rank: Unknown
timestamp: May 19, 2020, 01:55:55 am
content: Quote from: amyk on May 19, 2020, 01:48:21 amROM Encryption and read lock are two different things available in this MCU.

author: greenpossum
author_rank: Frequent Contributor
timestamp: May 19, 2020, 02:38:58 am
content: The first 3 bytes are the reset vector 02 0C 4F which is LJMP 0C4F. As said before, put it through a disassembler to see if the dump makes sense.
K210 serial bootloader host program - Page 1
Forum section: electronics / general

author: blueskull
author_rank: Unknown
timestamp: May 04, 2020, 12:01:21 pm
content: Hi all,Just want to share a host side program which talks to K210's serial bootloader to load firmware into the K210 without having to download it to the flash then boot from it.The reason I want after this path is because I want to reduce board size and BOM, by eliminating an extra flash chip.Also, K210 is pretty particular to flash chips. It has to be 1.8V, and it has to support QSPI. That basically means no small 2mm*3mm chips for me under $1.So, instead of using more PCB area, I chose to bootload it from a host system, in this case, ESP32.The current program was tested under Ubuntu 20.04 + Sipeed MAIX Bit, and it uses RTS/DTR logic to set boot mode and reset. There is a glitch prevention circuit just like on ESP32 boards.This program is tailored for little-endian systems (due to some memcpy functions used to copy uint32_t directly to uint8_t), but you can easily swap the orders or use logic shifting to do the copies.Have fun.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 04, 2020, 12:54:43 pm
content: That's interesting.I have decided against using K210 CPUs a while ago for a number of reasons I already mentioned, but this is still an interesting chip and your approach is certainly interesting. Do you have some figures regarding the typical throughput (say in KBytes/s) to load code into K210's RAM?The approach could be not only useful to avoid a Flash chip, but could also be used to "re-purpose" the K210 on the fly, and if download times are reasonably short, that could definitely allow pretty interesting stuff.Just took a quick look at your code and it seems simple enough that porting it to a non-hosted target should be straightforward too.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 04, 2020, 04:11:11 pm
content: Quote from: blueskull on May 04, 2020, 01:09:08 pmOK thanks. Wasn't sure if the bootloader rate could be changed or not.So yeah, 10 KB/s seems pretty slow, but yes, writing a small executive should not be hard to do. I think this is what the flash application provided by Kendryte does already (but yes it's just meant to program flash.)

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: May 05, 2020, 06:17:00 am
content: Thanks for sharing, I could not find datasheet and User Manual for this K210,I always wanted to work with it, where did you find the docs?

author: OwO
author_rank: Super Contributor
timestamp: May 05, 2020, 07:01:13 am
content: Quote from: blueskull on May 04, 2020, 12:01:21 pmW25Q64FW? 1.8V and supports QSPI.
How to configure a pin of an STM32F103C4 as Source of current in Proteus - Page 1
Forum section: electronics / general

author: panoss
author_rank: Frequent Contributor
timestamp: May 02, 2020, 03:40:05 pm
content: I want to configure a pin as a source of current (of an STM32F103C4) so when it's HIGH it has 3.3V and when LOW 0V.(in Proteus 8.6)I haven't managed this till now even though I have tried any possible configuration (GPIO Mode: output push pull, Output open drain, GPIO pul up-pull down: pull down, pull up etc ) of the pin (PB15).I 'm using STM32CubeMX 5.2.1, Atollic TrueStudio 9.3.0, Proteus 8.6.First of all: in order for the pin to source current, I must put 'GPIO Mode: output push pull'. Right?In the attached file you 'll find the Proteus project and the hex file. It 's an LED connected to pin PB15, it's supposed to blink but it doesn't, voltage on this pin goes only up to 1.5V when HIGH.

author: kamtar
author_rank: Regular Contributor
timestamp: May 02, 2020, 03:55:11 pm
content: calculate current going from that gpio (voltage drop on LED resistor) that is going to help you in figuring up in which state it is

author: panoss
author_rank: Frequent Contributor
timestamp: May 02, 2020, 04:09:09 pm
content: I know when it's ON from the voltage. (but as I already mentioned, ot's only 1.5V. It should be 3.3V)Maybe something 's wrong with the power rails in the simulation?

author: panoss
author_rank: Frequent Contributor
timestamp: May 02, 2020, 08:35:34 pm
content: I made a new project in Proteus but this time I used an STM32F103R6 and works just fine!So my conclusion is that the STM32F103C4 in Proteus is BUGGY!Thank you all guys.
Sigfox Wisol WSSFM10R1 module issue  - Page 1
Forum section: electronics / general

author: diyaudio
author_rank: Frequent Contributor
timestamp: May 02, 2020, 02:33:34 pm
content: I put together a small PCB using a Sigfox WISOL / WSSFM10R1AT module, which is based off AX-SIGFOX(AT Command Controlled, Sigfox Compliant, Transceiver IC)https://www.onsemi.com/pub/Collateral/AX-SIGFOX-D.PDFhttps://arduino-shop.eu/docs/produkty/0/555/wisol_wssfm10r1at.pdfThe issue using test firmware and sending "AT" I get "OK" as expected. however after repeating the command every 10-seconds the dam module locks up and doesn't respond until I power-cycle and it just does it again.1) I have probed the power-supply for noise I get about 350mV peak on VCC node at the PIN and set to Baud: 9600.2) I'm able to send packets which does reach the network. Example: AT$SF=01020304Again, if I try and repeat another periodic command like: AT$T? // Get the temperature and it works, however it only responds for a few repeat cycles and locks up with no RX.Can anyone shed light on this issue?

author: diyaudio
author_rank: Frequent Contributor
timestamp: May 02, 2020, 08:04:41 pm
content: I have found the source of the problem, with some deeper analysis.Basically, I connected the scope-up in single shot mode left it running a found there's a 2.5V drop for 1ms which causes the module and MCU to brownout So the real problem is on the buck-boost.
Is OLED display module | Maclight China compatible with aruino?  - Page 1
Forum section: electronics / general

author: irfan900
author_rank: Newbie
timestamp: April 09, 2020, 09:21:52 am
content: Hi,I hope you all are doing great.Actually, I want to know is OLEDhttps://www.szmaclight.com/3-5-inch-tft-lcd-module-display.htmldisplay Module|maclight China compatible with Arduino?I am waiting for your response!ThanksIrfan

author: dmendesf
author_rank: Frequent Contributor
timestamp: April 09, 2020, 04:17:13 pm
content: Link is broken. Even fixing the extra "https" at the start of the link I couldn't figure out the exact display you meant to.

author: dmendesf
author_rank: Frequent Contributor
timestamp: April 09, 2020, 04:20:46 pm
content: Ok, had another idea and got the link working. The page has several different LCD modules. Most of them are controllerless LCDs, and those cannot be driven by an Arduíno. At least one of them uses the ILI9486L controller. This one can be arduino driven.

author: MarkF
author_rank: Super Contributor
timestamp: April 09, 2020, 04:57:35 pm
content: Link still broken.Is this it?3.5 inch ips tft 320x480 SPI RGB MCU interface MLT035H50-12This display will require a lot of supporting circuitry. (Various power voltages and logic level shifting.)Which Arduino do you want to use? Does it have 3.3V or 5V GPIO?If your Arduino has 5V logic levels, you will need to level shift them for the ILI948LIt has internal display RAM so the Arduino only needs to send drawing commands.Does not require a large amount of Arduino memory to host the graphics RAM.Checkout these from Adafruit:3.2" TFT 240x320 LCD + Touchscreen Breakout Board w/MicroSD Socket - ILI9341$30 USD.3.5" TFT 320x480 LCD + Touchscreen Breakout Board w/MicroSD Socket - HXD8357D$40 USD

author: voltsandjolts
author_rank: Unknown
timestamp: April 09, 2020, 05:03:06 pm
content: Its just a spammer, don't worry about it.

author: irfan900
author_rank: Newbie
timestamp: April 10, 2020, 08:02:31 am
content: Thank you sir

author: Till Matte
author_rank: Contributor
timestamp: April 23, 2020, 01:11:57 pm
content: Hi Dear, it is 3.5" tft lcd module, i think you need to add a converter board before connected to Aruino, by connected it via its MCU interface.

author: jackthomson43
author_rank: Contributor
timestamp: May 01, 2020, 12:53:10 pm
content: You should download Arduino Library for TFT LCD, examples are there works like charm. But real trouble lies in circuit diagram as there are too many pins to handle. Share your circuit diagram.https://www.theengineeringprojects.com/2019/11/introduction-to-16x2-lcd-module.html