hybridfree/eevblog-posts huggingface dataset:
atmel samd20 waveform output module numbers. - Page 1
Forum section: electronics / general

author: snarkysparky
author_rank: Frequent Contributor
timestamp: December 11, 2019, 08:53:37 pm
content: I have code using TC2 - WO to drive a stepper clk coming out PA16Trying to use TC4 - WO on pin PA23.Well it isn't working. The pin PB9 which also can use TC4 - WO is getting clobbered even though I set it up as digital output and set upPA23 to use peripheral number 5 -> F.Question: If TC4 - WO appears possible on multiple pins how is the correct one selected.Are there multiple WO outputs , such as one for each timer.The data sheet says this"Waveform output channels per TC instance 2" ( page 11 )Leads me to believe there are two channels for each timer ??I am using match frequency generation mode ( MFRQ).Is there a CC0 for each timer?Thanks

author: westfw
author_rank: Super Contributor
timestamp: December 12, 2019, 08:36:00 am
content: QuoteVia the PINMUX setting for PA23. You'd set it as F (which isn't F) to get TC4/WO1 - it should be the same way you're setting up PA16.I would think that if you have multiple pins set to output TC4/WO1, it would actually appear on multiple pins.
STM32F103C8 and USB from STMCube - Page 1
Forum section: electronics / general

author: kamtar
author_rank: Regular Contributor
timestamp: December 07, 2019, 05:32:52 am
content: Did somebody tried to generate USB project for STM32F103C8 from CubeMX?Im having problems with MCU reading out empty packets and its an issue only with a code generated by CubeMX, so I'm curious if there is somebody who had similar problem.
Is it possible to convert STM8 hex to C code? - Page 1
Forum section: electronics / general

author: Chriss
author_rank: Frequent Contributor
timestamp: December 07, 2019, 01:20:51 am
content: Hi!I have a battery charger with an STM8S003F3 in there.I would like to change a startup function and add a reset/restart button function.I know, I could add the reset manually on the pcb too, but just for fun I would poke around the firmware.Is it possible to convert the firmware from this uC to C/C++ code if I read out the content?Thanks.

author: thm_w
author_rank: Super Contributor
timestamp: December 07, 2019, 01:38:28 am
content: No, not in any way you would want. Try reading out the code first then go from there.https://stackoverflow.com/questions/42166539/microcontroller-stm8-disassembly

author: ataradov
author_rank: Super Contributor
timestamp: December 07, 2019, 01:57:15 am
content: It is impossible automatically. However, it is an 8K device, and the real HEX size is probably less. If you know what you are doing, you can reverse that in a couple days.
chipKIT Pro MX7 Physical dimension - Page 1
Forum section: electronics / general

author: lorenrus
author_rank: Regular Contributor
timestamp: December 05, 2019, 04:59:03 pm
content: Hi everybodyI need to know the physical dimension of chipKIT Pro MX7 board. In its reference manual there isn't this information.Can you help me ?Best regards

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 05, 2019, 09:46:06 pm
content: https://www.chipkit.net/wiki/index.php?title=ChipKIT_Pro_MX7You can download Eagle files for the PCB. It also comes with Gerber files, so if you don't have Eagle and don't want to install it, you can just use a Gerber viewer. You'll get the dimensions you're after, and more.

author: lorenrus
author_rank: Regular Contributor
timestamp: December 05, 2019, 10:18:22 pm
content: Thank you very much man.I didn't know that site.Thanks againBest regards

author: wilfred
author_rank: Super Contributor
timestamp: December 06, 2019, 01:22:33 am
content: The PCB is 96mm x 109mm. The USB and Ethernet connectors hang over the edge 1-2mm so allow 4mm for a case fit. This was the Cerebot MX7 cK. I didn't check to see it the PRO is a different thing.
Mullard High Speed Valve Tester Card Coding with Microcontrollers? - Page 1
Forum section: electronics / general

author: Chris56000
author_rank: Frequent Contributor
timestamp: December 02, 2019, 10:08:26 pm
content: Hi!The Mullard High Speed Valve Tester uses a system of tailor–made punched cards with a matrix of punched holes to code a 13 × 10 matrix of switches, columns 1 to 10 and rows A to M, each card having a unique hole coding pattern. Estimates on the UK Vintage Radio Forums suggest about 2048–2600 unique code combination s are available, but the original data has got so fragmented no–one knows the exact true number!Given that each card pattern can be treated as a unique address in memory, can anyone point me in the direction of tutorials, resources, etc., I can use to work out a means of entering the codes with up/down button control, displaying the card no. & Valve type on a large LCD or (better!) Colour TFT.The best display would be a "moving pointer arrow" that moves across a bar scale coded red, yellow, green and blue displayed on a TFT, the "moving pointer" being a linear d.c. voltmeter, 0–200mV or 0–1V F.S.D. – any resources to help me design this?I have a calculator tool that would work out the data outputs needed for each card type, (equivalent to each memory address) by the way!I know how to work out all the data decoding, relay switching, indicating meter circuitry, h.t. and grid–voltage control, etc., but I'm a repair engineer that didn't study digital design/programming!Chris Williams

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: December 02, 2019, 10:42:28 pm
content: I'm an embedded programmer who didn't learn about high speed valve testers, so I'm not sure about the application you describe.However, it sounds like you want to learn how to program microcontrollers. Therefore I would suggest an arduino with a color lcd screen as a place to start.
ESP32 and Arduino - MAX 6675 Hardware analysis with a Hantek 2 channel DSO - Page 1
Forum section: electronics / general

author: jcrubin
author_rank: Frequent Contributor
timestamp: December 02, 2019, 02:09:11 pm
content: Today we revisit the Max6675 to take a closer look at what goes into the design of a library based on the hardware data sheet to provide for the most efficient interaction with the device using the smallest memory footprint. This will use a converted example based on the library from Yurii Salimov. The demo is not designed to be efficient but to demonstrate the steps required.After the demonstration is conducted the data produced is simple enough that it can be visually demonstrated and calculated without the ESP32 using a two channel oscilloscope, in this case a Hantek DSO 5000P, using the trigger input to make display of this event easier freeing up the second channel for view.
STM32: Is there a reason not to enable (peripheral) clocks? - Page 1
Forum section: electronics / general

author: JohnnyBerg
author_rank: Frequent Contributor
timestamp: December 01, 2019, 03:59:43 pm
content: Looking at the code CubeMX generates (LL not HAL), LL_APB1_GRP1_PERIPH_PWR and LL_APB1_GRP2_PERIPH_SYSCFG are enabled at startup, whilst LL_AHB1_GRP1_PERIPH_GPIOA is enabled at the first declaration of a GPIO.it would be more practical to enable all clocks at once.Is there a reason for that? I could think of power consumption, but do not know if that is true. Or perhaps glitches during startup, when the HSE etc. gets configured?

author: Siwastaja
author_rank: Super Contributor
timestamp: December 01, 2019, 04:50:05 pm
content: Power. It's logical to enable only what you need, whenever you need it. If you have a "driver" layer with a driver init function, it's a logical place to do it. Otherwise, it's ok to do at once, for all peripheral clocks enabled in the same register.GPIO is kind of an exception for this, though, because often many "driver modules" (or just parts of your program) share pins from the same GPIO group, so enabling all at once makes sense.

author: Kjelt
author_rank: Super Contributor
timestamp: December 01, 2019, 05:02:46 pm
content: Indeed power usage, during operation but mainly during (deep) sleep you disable as much as possible, only the bare minimum you need to be able to wake up again, all depending on the requirements.You can also lower the clock frequencies temporarily of the cpu or the peripherals as low as needed during long waits to save power.

author: mark03
author_rank: Frequent Contributor
timestamp: December 01, 2019, 07:58:11 pm
content: I believe the OP was asking why clocks are enabled at different points in the code rather than all together in a single init block, not "why don't we enable clocks to every peripheral on the chip."And the answer is, there is no reason, except general code hygiene. You could certainly enable all of the clocks in one subroutine, but it is often clearer to place the clock enable together with the rest of the init code for that peripheral. I usually place each peripheral (or sometimes a group of peripherals working together toward a single purpose) in its own C++ class, with all of the peripheral init code in an Init() method. (I don't use the HAL.)
Atollic TrueSTUDIO - STM32 and Lora - Page 1
Forum section: electronics / general

author: panoss
author_rank: Frequent Contributor
timestamp: November 27, 2019, 11:59:35 am
content: I 've built a Lora sender with Arduino.I want to rebuilt it with STM32 (STM32F030F4P6).So I 'm thinking of starting with theLora library.I mean to convert it to Atollic studio code (a class I suppose).(I 've also found anSTM32 STM32duino librarythat might help)Am I on the right track for accomplishing my goal?How do I create a class in TrueSTUDIO?I just create a new file in src folder of my project?Right click on Src folder->New->Class?

author: ebclr
author_rank: Super Contributor
timestamp: November 27, 2019, 06:07:39 pm
content: This may help youhttps://circuitdigest.com/microcontroller-projects/getting-started-with-stm32-development-board-stm32f103c8-using-arduino-ide

author: panoss
author_rank: Frequent Contributor
timestamp: November 27, 2019, 08:19:29 pm
content: Thank you but it 's for the STM32 with the Arduino IDE.Anyway, I 've managed to blink an LED with TrueSTUDIO.But I have no clue how to go further...Any help is welcome.I 've seen the examples in TrueSTUDIO (File->New->Download new example project) but didn't help me much.I still don't know how to create a library (or whatever is the right term in TrueSTUDIO).I can't find any tutorial. The tutorials I find are about using the IDE or they are wit STM32duino.
STM32 L476RG Nucleo Board and LoRaWAN - Page 1
Forum section: electronics / general

author: CalMachine
author_rank: Frequent Contributor
timestamp: December 06, 2019, 05:13:54 pm
content: I'm trying to play around with LoRaWAN communication and am hitting a few roadblocks using the ST's LoRaWAN stack. I've successfully implemented the Chirpstack.io Network bridge, Network server, and Application server on an RPi4. As for the gateway, I'm using a LAIRD Sentrius RG191 8 channel gateway.One main issue I'm currently observing is the nucleo board only seems to want to send a maximum of 7 uplinks before the stack seems to fail or timeout. I'm also having a hard time trying to figure out how to properly define the channel map I'd like to use, which I defined on the gateway.I've gone over the UM2703 many times and I'm not finding any relevant information. Software is not my forte, so any help or advice would be great
SparkFun RED-V  - Page 1
Forum section: electronics / general

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 25, 2019, 01:57:05 am
content: (Sorry if this is old news!)SparkFun just released a new dev board with a SiFive FE310 (RISC-V MCU).https://www.sparkfun.com/products/15594

author: brucehoult
author_rank: Super Contributor
timestamp: November 25, 2019, 04:57:55 am
content: Couple of days old, but I haven't seen it mentioned on eevblog before.The RED-V RedBoard seems to be pretty similar to the HiFive1 bit different to either the Rev A or Rev B. It seems to have the improved FE310-G002 from the HiFive1 Rev B, so should have hardware I2C. It also has 32 Mbit of flash like the Rev B, not the (excessive, tbh) 128 Mbit in the Rev A. But it doesn't have the ESP32 that the Rev B has.The JTAG + UART to USB solution is also different. The HiFive1 rev A uses an FTDI chip, the rev B uses a SEGGER chip, but the RedBoard uses an NXP ARM M4 with USB -- which incidentally is what the official Arduino Cinque that was announced in May 2017 (but never shipped) did. I think that was a casualty of the wars between the two Arduino factions...http://linuxgizmos.com/arduino-cinque-board-taps-sifive-risc-v-soc-and-an-esp32-wireless-chip/(looking at the photos in that article, the ARM for USB was an STM part, but whatever)Also announced was the smaller "RED-V Thing Plus":https://www.sparkfun.com/products/15799

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 25, 2019, 03:04:12 pm
content: Quote from: brucehoult on November 25, 2019, 04:57:55 amThanks for the info. From Sparkfun's description, it was not clear. And in the provided documents section, they actually link to the FE310-G000 manual...Quote from: brucehoult on November 25, 2019, 04:57:55 amProbably OK, or even good, for some, but I personally much prefer an FTDI or SEGGER-based solution. Sparkfun has probably chosen what may appeal more to the typical crowd that buys at Sparkfun in terms of tools, dunno.Anyway, the good side is that it probably gives more exposure to RISC-V in general, and SiFive in particular, given that Sparkfun has a large "audience".

author: brucehoult
author_rank: Super Contributor
timestamp: November 26, 2019, 12:49:37 am
content: Quote from: SiliconWizard on November 25, 2019, 03:04:12 pmI'm just going off their pics. I don't have any inside knowledge. Zoom in...
MCP2518FD CANBUS library for STM32 - Page 1
Forum section: electronics / general

author: cmcraeslo
author_rank: Regular Contributor
timestamp: November 21, 2019, 01:01:27 pm
content: Hey.I'm looking for a library or ported code for the MCP2518FD chip? Cant seem to find it and I wouldn't want to go and make my own or port it from arduino if possible
Stm32F4 USb HID keyboard help needed - Page 1
Forum section: electronics / general

author: cncjerry
author_rank: Unknown
timestamp: November 08, 2018, 02:31:43 am
content: I am adding keyboard functionality to my RC-28 encoder project using a STM32F469i board. I created a set of composite HID descriptors. Prior to combining the keyboard and encoder I made sure both worked correctly. I had to modify the CubeMx code to ensure the report descriptors were returned correctly and have been using wireshark to trace the USB flows and all looks ok except for the following.When I pressed a key prior to combining the descriptors, I got the key pretty much immediately. Now the PC buffers 443 single characters if I send only one in the HID report and 6 times this number if I send 6 characters at once in the keyboard HID report. I'm not using any modifiers. I am sending a release key of all zeros after each key but it is acting like it is stuck. If I lengthen the delay to 10ms after the press before release I will see roughly twice this amount. I see only one keypress in the trace followed 5ms later by the release so it isn't my code being delayed. This USB HID stuff is very complicated but I think I understand it now. It must be my code because it worked before the combination into a HID collection. No errors in device manager,etc. I know the buffering and keyboard repeat delay is handled by the PC but cant figure this out. I've been posting on the ST boards, got some help, but not for this one. Clearly the config descriptor or HID report descriptor is wrong or scrambled but I cant find it.Ideas? Any way to trace the input keyboard driver?ThanksJerry

author: w4ghv
author_rank: Newbie
timestamp: November 18, 2019, 01:52:37 am
content: Ouch! I just sent you a note about this, but just read this post fully. This seems way more complex than I expected.I think I had a suitable circuit going with Arduino, but thought the STM32 would be 'more fun'.Now I'm wondering.Hopefully I can get it going under Arduino.73, Bo W4GHV
PIC16F54 External clock - Page 1
Forum section: electronics / general

author: Aztlanpz
author_rank: Regular Contributor
timestamp: November 14, 2019, 10:14:56 am
content: I am having a hard time getting the PIC16F54 to run form an external clock. I am using a function generator( SIGLENT’s SDG2000X) to generate a TTL square wave at 2.4 MHz and i am using pin16(OSC1/CLKIN) as the clock pin. Is it passable to run the PIC16F54 with an external Clock?Thank youAztlan

author: MarkF
author_rank: Super Contributor
timestamp: November 14, 2019, 12:01:28 pm
content: What are your configuration bits?I always use HS mode when using an external clock. See Figure 4-2 in the datasheet.Also, do you have MCLR- (pin 4) pulled high?Code:// PIC16F54 Configuration Bit Settings// 'C' source line config statements// CONFIG#pragma config OSC = HS // Oscillator selection bits (HS oscillator)#pragma config WDT = OFF // Watchdog timer enable bit (WDT disabled)#pragma config CP = OFF // Code protection bit (Code protection off)// #pragma config statements should precede project file includes.// Use project enums instead of #define for ON and OFF.#include <xc.h>

author: Ian.M
author_rank: Super Contributor
timestamp: November 14, 2019, 12:09:20 pm
content: @Aztlanpz,Yes, but it wont run that way 'fresh out the box'. You'll need to set the CONFIG (aka: 'fuses') for XT or HS oscillator mode*(as MarkF has already mentioned), and you'll need to put a clean logic level signal with fast edges free from ringing on the OSC1 pin. There's a good clue to what it needs in thedatasheet, figs 4-2 and 4-3 which both show a buffer between the clock source and the OSC1 pin. Additionally fig. 4-3 uses a 74AS04, which suggests that LS TTL logic may not be fast enough.If you are using an off-board clock source, you'll need to terminate the cable from it to suppress ringing and reflections. Based on the datasheet figs 4-2 and 4-3, I'd then recommend a 74AC or similar high speed CMOS Schmidt input gate, as close as possible to the PIC, to clean up the edges. Good decoupling will be essential.* The difference between XT and HS mode is the gain the internal Pierce oscillator amplifier between OSC1 and OSC2 is configured for. As you aren't using OSC2, either should work equally well. RC oscillator mode with an external signal source is disastrous, see fig. 4-5, the internal N-MOSFET discharge transistor shorts the input almost as soon as it goes high!
STM32 capable tracking 3 quadrature encoders? - Page 1
Forum section: electronics / general

author: ace1903
author_rank: Regular Contributor
timestamp: October 18, 2019, 01:47:58 pm
content: I have old milling machine with 3 Heidenhain encoders.Would like to make display that will show position in 3 coordinates and will run some algorithm in background.Ideally some nucleo board will fit perfectly in this project.But I can not find STM32 with more than 2 timers capable to work in quadrature mode decoding.Does someone knows STM micro with such capabilities?I have alternative with small FPGA as interface but prefer everything to be on STM if possible.

author: langwadt
author_rank: Super Contributor
timestamp: October 18, 2019, 01:59:53 pm
content: Quote from: ace1903 on October 18, 2019, 01:47:58 pmSTM32F411 (and probably others) an do 4 (tim2,tim3,tim4,tim5) two of the timers are only 16 bit but it is simple to safely extend that in SW

author: ace1903
author_rank: Regular Contributor
timestamp: October 18, 2019, 02:15:32 pm
content: Forgot to mention , resolution is few um so 16 bit is quickly overflowed.But anyhow, looking at pin list I can see only two pairs of encode capable pins.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 18, 2019, 02:28:57 pm
content: Do the decoding in software. It's not hard.

author: langwadt
author_rank: Super Contributor
timestamp: October 18, 2019, 03:34:18 pm
content: Quote from: ace1903 on October 18, 2019, 02:15:32 pma look at my code says; PA0,PA1 - PA5,PB3 - PB4,PB5 - PB6,PB7add some code similar to this, and as long as the 16 bit count doesn't wrap more than once between ticksit should be safeCode:volatile int32_t pos1;volatile int32_t pos2;volatile int32_t pos3;volatile int32_t pos4;void SysTick_Handler(void){int16_t tm3 = 0;int16_t tm3dif = 0;static int16_t tm3_d = 0;int16_t tm4 = 0;int16_t tm4dif = 0;static int16_t tm4_d = 0;pos1 = TIM2->CNT;pos2 = TIM5->CNT;tm3 = TIM3->CNT;tm3dif = tm3-tm3_d;pos3 += tm3dif;tm3_d = tm3;tm4 = TIM4->CNT;tm4dif = tm4-tm4_d;pos4 += tm4dif;tm4_d = tm4;}https://github.com/langwadt/nucleo_quad4

author: lucazader
author_rank: Regular Contributor
timestamp: October 20, 2019, 06:42:07 pm
content: You can also setup this up so that on a timer over/underflow an interrupt will trigger, so you can immediately handle this.

author: Retirednerd2020
author_rank: Regular Contributor
timestamp: November 13, 2019, 12:25:59 am
content: The STM32F446 can do six. Four are 16 Bit, two are 32 Bit. TIM1,3,4,8 and TIM2,5 respectively. Similar code to extend to 32 or more bits can be used as mentioned above.
Tips in getting into ARM Cortex M7 processors and external memory (imxRT1020) - Page 1
Forum section: electronics / general

author: crayon
author_rank: Newbie
timestamp: November 08, 2019, 03:06:38 pm
content: Hi!I'm new here, and I'm trying to get a headstart in the development of system code and application code to support some projects of mine. I got a MIMXRT1020-EVK. This board has on board QSPI flash and some SDRAM. I was using the McuXpresso SDK builder and IDE. But I started to use only the GCC toolchain (and the GCC version of the SDK) and uploaded the Jlink firmware to the openSDA debugger (with some help from a Zephyr RTOS tutorial, to make the probe Jlink compatible).I was expecting to things not to work on the first go, but the linker script and the CMake build (both from a example project) created a elf file that I was able to load, debug and execute with the JlinkGDBServer and arm-none-eabi-gdb. It seams the QSPI flash is working and holds the code that's executed. Is there some bootloader always present that NXP shipped with that board? How can the QSPI flash work if the code that I build only contains code I can identify to not be some bootloader? Is that what NXP calls a BootROM? How would I ensure this functionality is present for development if I were to spin my own boards with some kind of external flash?Thanks in advance for you advice.

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: November 08, 2019, 03:31:20 pm
content: The RT1020, like most ARM MCUs, has a system ROM with a bootloader for many of the chip's external interfaces. See the datasheet's Section 5, "Boot mode configuration", and the reference manual, "System Boot", for the details.
new stm32duino site - Page 1
Forum section: electronics / general

author: profdc9
author_rank: Frequent Contributor
timestamp: November 08, 2019, 07:13:52 am
content: There is a new site for stm32duino discussion. It is atmcu.selfip.comUnfortunately, all of the old discussions from the old stm32duino.com can not be restored yet.But it works and it is active.
PIC mid-range MCU async event loop - Page 1
Forum section: electronics / general

author: kdmal
author_rank: Newbie
timestamp: November 07, 2019, 10:04:13 am
content: Hello, please rate my projecthttps://github.com/humkanet/pic-loop/Features at this moment:Running multiple tasks asynchronouslyAsynchronous sleepAll task variable must by ** static **, by default event loop can run 5 tasks, but you can change event loop queue by change LOOP_MAX_TASKS in loop.h

author: jaromir
author_rank: Unknown
timestamp: November 07, 2019, 12:49:54 pm
content: Quote from: kdmal on November 07, 2019, 10:04:13 amFrom what I gathered it's simple task scheduler/RTOS. I'd like to comment, but it's hard for me, because:- documentation is somehow lacking- I can't find much of an real world examples and testing results- comments in code are sparse and in Russian only

author: kdmal
author_rank: Newbie
timestamp: November 07, 2019, 01:06:48 pm
content: Sorry, im rewrite comments to engReal world example, blink led in backgroud, or update any information on display, for example:Code:void task_blink(){for(;;){led_on();loop_sleep(500);led_off();loop_sleep(500);}}void task_uptime(){static uint16_t prev;statuc uint16_t sec;prev = clock_sec();for(;;){// Sleep 1 secondloop_sleep(1000);// Seconds changedsec = clock_sec();if (sec==prev) continue;prev = sec;// Display uptime... display seconds ...}}...void main(){...loop_init();loop_start_task(task_blink);loop_start_task(task_uptime);...// Main loopfor(;;){// Current system clockuint16_t msec = clock_msec();// Process event looploop_tick(msec);// Other actions}}Both tasks (task_blink and task_uptime) working without block main loop

author: Ian.M
author_rank: Super Contributor
timestamp: November 07, 2019, 02:23:08 pm
content: 'Classic' Midrange PICs don't support task switching. Therefore your code is only suitable forEnhanced MidrangePics, and in loop.h, you should check that either _PIC14E or _PIC14EX is defined, (see XC8 user guide: TABLE 4-15: PREDEFINED MACROS), and if not, fail with:Code:#error Not an Enhanced Midrange PIC!

author: NorthGuy
author_rank: Super Contributor
timestamp: November 08, 2019, 12:43:47 am
content: What's the point of saving FSR0 when you must know it before restoring:Code:// Save registersasm("movwi 0");asm("movf BSR, W");asm("movwi 1");asm("movf FSR0H, W"); // this is redundantasm("movwi 2"); // this is redundantasm("movf FSR0L, W"); // this is redundantasm("movwi 3"); // this is redundantasm("movf FSR1H, W");asm("movwi 4");asm("movf FSR1L, W");asm("movwi 5");When you restore, the FSR0 is already set when you start restoring, so:Code:asm("moviw 1");asm("movwf BSR");asm("moviw 2"); // this does nothingasm("movwf FSR0H"); // this does nothingasm("moviw 3"); // this does nothingasm("movwf FSR0L"); // this does nothingasm("moviw 4");asm("movwf FSR1H");asm("moviw 5");asm("movwf FSR1L");asm("moviw 0");

author: kdmal
author_rank: Newbie
timestamp: November 08, 2019, 02:59:34 am
content: NorthGuy, thanks!
Is it possible to read from an RS232 port, of an espresso machine controller - Page 1
Forum section: electronics / general

author: Yamin
author_rank: Frequent Contributor
timestamp: November 04, 2019, 09:42:51 pm
content: I have got a faulty Gicar control board taken from an espresso machine. The controller is made around the micro controller ST62T60C6. There is a port for RS232 communication with a jumper shorting out the middle two pin.I am curious to know if there would be any way to read from this port? Perhaps using an arduino? I am currently doing some reading on RS232 protocol.Any tips and tricks would be greatly appreciated.Thanks in advance.I have attached pictures of the controller.

author: sokoloff
author_rank: Super Contributor
timestamp: November 04, 2019, 09:50:17 pm
content: Buy a cheap (under $20) usb logic analyzer and use sigrok software.Swiss Army knife compared to trying to do it with an Arduino.

author: DBecker
author_rank: Frequent Contributor
timestamp: November 04, 2019, 10:33:00 pm
content: Measure the voltage at the "RS232" port. It is likely "TTL" level serial, with the idle level at 3.3V or 5V, not RS232 with an idle at -9V.
CH552E group buy - Page 1
Forum section: electronics / general

author: blueskull
author_rank: Unknown
timestamp: November 13, 2019, 07:03:59 am
content: This is a continuation to my previous CH552 thread.I just came back from China after an interview, and I have a month in US to pack up and leave for one last time.Meanwhile, I brought back 100pcs of CH552E, so if anyone are interested, I'm glad to shell out some.Asking for $10/30pcs plus USPS shipping or your own label. Up to 90 is for sale, I need 10 for my own use.Also, I may order a batch of BY25D16 (16Mbit) SPI flash, DFN2*3, $0.2 each, MOQ 500 pcs. I'm trying to hit the 3k MOQ target.
Reflashing firmware in st-link (STM32F103CBT6) in Nucleo board ? - Page 1
Forum section: electronics / general

author: laurentz
author_rank: Newbie
timestamp: November 07, 2019, 12:23:15 pm
content: Hello, my Nucleo-F446RE board just went dead this morning (USB device not recognized anymore).I only get 4 slow red flashes, then nothing. Device manager in Windows 10 says it cannot get the USB descriptor.Is it possible to re-flash the ST-Link part (STM32F103CBT6 it seems) to get back the original béhavioral (at least to be able to use the ST-Link upgrader STWS-link007) ?If so, where to find the binary and how to proceed: I suppose I'll need an external ST-link or Serial programmer and connect to some pins on the board ?Any hope ?Best regards,Laurent

author: mark03
author_rank: Frequent Contributor
timestamp: November 07, 2019, 06:06:29 pm
content: It has been a long time since I did this, but I remember it is possible. The procedure may be different for different boards. On mine I needed to change some of the solder jumpers to provide access to the JTAG SWD lines on the ST-Link processor, then use a second dev kit (or something like a J-link) to re-program the part via SWD. I don't know where to find the ST-Link firmware image but I imagine it is available. I was flashing the Black Magic Probe firmware on mine. Maybe google for that to see some examples of the procedure?

author: GromBeestje
author_rank: Frequent Contributor
timestamp: November 07, 2019, 06:35:06 pm
content: You can flash the bootloader, available athttps://github.com/Krakenw/Stlink-Bootloaders(be sure to take the correct version v2.0 vs v2.1) via SWD.Then use the official STLINK upgrade tool to reflash the actual firmware.

author: emece67
author_rank: Frequent Contributor
timestamp: November 07, 2019, 07:43:14 pm
content: .

author: laurentz
author_rank: Newbie
timestamp: November 07, 2019, 09:43:46 pm
content: Thanks to all for giving me some hopeQuoteCould you explain a bit more which pins I should look after on F446RE board ? I've a spare ST-Link V2 (clone unfortunately) that I could use to reflash the board but I can't figure out where to connect it

author: GromBeestje
author_rank: Frequent Contributor
timestamp: November 07, 2019, 10:00:35 pm
content: See thishttp://nuft.github.io/arm/2015/08/24/blackmagic-stlink.htmllook at wiring

author: laurentz
author_rank: Newbie
timestamp: November 07, 2019, 11:07:08 pm
content: Amazing, probably the board was scared by reading the instructions to reflash it, I started testing the continuity of the SWD signals from the connector, and it suddenly is working again.
CMOS MCS-48 and UPI-41 devices re. opcodes - Page 1
Forum section: electronics / general

author: Scratch.HTF
author_rank: Regular Contributor
timestamp: November 04, 2019, 01:38:01 am
content: I am currently in the process of writing an emulator for an MCS-48 compatible microcontroller and considering adapting it for the UPI-41.From what I know, certain CMOS MCS-48 and UPI-41 devices implement additional hardware functions and/or additional instructions which can include software control for power saving; in addition, certain instructions can differ between such devices within their respective families.The manufacturers (other than Intel) of such devices with additional and/or modified opcodes I know of are OKI (e.g. MSM80C49), NEC (e.g. uPD80C49 and uPD80C42), Toshiba (e.g. TMP80C48) and Philips (e.g. PCF84C00) - do you know of any other manufacturers (and MCS-48/UPI-41 devices thereof) with such characteristics?

author: splin
author_rank: Frequent Contributor
timestamp: November 04, 2019, 04:45:16 am
content: DAEWOO also licensed the 80C48/49 design:https://www.datasheetarchive.com/pdf/download.php?id=6f66fd6a2255a08b3f025d159a16b532e1d474&type=O&term=zymos%252080c49I rather doubt they would have altered the masks in any significant way, especially to add new instructions but maybe they did. National Semi produced the NMOS versions but I can't remember if they bothered had e CMOS versions. I'm sure I'd remember if they had their own CMOS specific instructions - but it was quite a while ago!
Padauk PMS15A: even cheaper MCU (1.2 cents!) - Page 1
Forum section: electronics / general

author: gir
author_rank: Contributor
timestamp: April 07, 2019, 08:42:51 pm
content: So, I just discovered that Padauk outdone themselves and created an even smaller and cheaper variant of the PMS150C, the PMS15A. The P150-series datasheet was updated to v1.06 to include the PMS15A on 2019-03-27 and is not present in v0.04 (2018-01-24).Main (only?) difference to the PMS150C is the ROM size (.5KW vs 1KW).The only seller I've found that (apparently) sells them is on 1688.com, which I have no experience with. There it is listed at .09yuan in qty 100, equalling roughly 1.2 cents. I'm wondering if/when other suppliers (especially LCSC) will have those new ones in stock.Datasheet:http://www.padauk.com.tw/upload/doc/PMS15A,PMS150C%20datasheet%20V106_EN_20190327.pdfProduct Info:http://www.padauk.com.tw/en/product/show.aspx?num=105Seller (SOP-8 only):https://detail.1688.com/offer/41229073536.html

author: spth
author_rank: Regular Contributor
timestamp: April 23, 2019, 08:30:32 pm
content: AFAIR Puolop (they sell devices using the same architetcure as Padauk) has a device with 0.75 KW of ROM.

author: ebclr
author_rank: Super Contributor
timestamp: September 03, 2019, 12:06:50 pm
content: Why wast time with one time CPU, while you have a flash CPU with include usb bootloader via USB for 15 cents CH551G, who can be developed in many plataform like Keyl, Sdcc, Mikroe IAR, is a much better option, and in high quantities, you can buy die only for few cents

author: LovelyA72
author_rank: Regular Contributor
timestamp: November 01, 2019, 05:15:42 pm
content: Quote from: ebclr on September 03, 2019, 12:06:50 pmI think it's more of a DIY spirit instead of usability. Think about it: people keep writing 4K demos, 2K demos, and even 128b demos, even low-end computers nowadays have a few hundred GB of storage.

author: thm_w
author_rank: Super Contributor
timestamp: November 01, 2019, 09:34:59 pm
content: 0.10 yuan each here:https://item.taobao.com/item.htm?id=604101329255orhttps://item.taobao.com/item.htm?id=596823385740SOT23-6, SOP8, then some more options I'm not sure of. I think programmed is an extra 0.02 yuan per. You can buy with a taobao reshipper.Their programming jigs look super impressive, and they even offer to write the code:Quote
Issue with chinese BLue Pill cks32f103c8t6  - Page 1
Forum section: electronics / general

author: Eldar
author_rank: Newbie
timestamp: November 03, 2019, 01:45:02 pm
content: I`ve got chinese clone CKS32f103c8t6 Blue Pill board with ST-LINK V2 (cheap clone again).I`m able to flash .hex file with ST LINK Utility software but I`m not able to use it with CubeIDE.Here is what I get when I press Debug Button:Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-07-16-09:47)Licensed under GNU GPL v2For bug reports, readhttp://openocd.org/doc/doxygen/bugs.htmlnone separateInfo : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWDadapter speed: 240 kHzadapter_nsrst_delay: 100Info : Listening on port 6666 for tcl connectionsInfo : Listening on port 4444 for telnet connectionsInfo : clock speed 240 kHzInfo : STLINK v2 JTAG v34 API v2 SWIM v7 VID 0x0483 PID 0x3748Info : using stlink api v2Info : Target voltage: 3.201053Info : Stlink adapter speed set to 240 kHzWarn : UNEXPECTED idcode: 0x2ba01477Error: expected 1 of 1: 0x1ba01477in procedure 'init'in procedure 'ocd_bouncer'I`ve found that, some solved that issue by pasting this line to the some .cfg file on platformio IDE.set _CPUTAPID 0x1ba01477How could be this done on cubeIDE?Thanks,Eldar.

author: dave j
author_rank: Regular Contributor
timestamp: November 03, 2019, 02:57:56 pm
content: Somewhere in your configuration it will reference a board configuration file for the blue pill called stm32f103_bluepill.cfg. You can add the set _CPUTAPID 0x1ba01477 to that file or, better, copy and edit file and use that.You might need to change the interface to stlink-v2 instead of stlink-v2-1 as well.I've attached the file I use. Remove the .txt extension (that's just to get it to work with the forum).

author: Eldar
author_rank: Newbie
timestamp: November 03, 2019, 03:14:18 pm
content: Thanks but I`m not able to find that file.U said somewhere in tghe configuration so I searched this address but didn`t find.C:\ST\STM32CubeIDE_1.0.2\STM32CubeIDE\configuration

author: dave j
author_rank: Regular Contributor
timestamp: November 03, 2019, 03:22:12 pm
content: The stm32f103_bluepill.cfg file is part of the OpenOCD installation.In your IDE it will probably be selected when you configure which board you use. (I'm not familiar with CubeIDE.)

author: Eldar
author_rank: Newbie
timestamp: November 03, 2019, 05:10:00 pm
content: I`m not familier with CubeIDE either

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 03, 2019, 10:45:53 pm
content: You should probably beware of cheap chinese blue pills anyway. Just saying.
Tiny, ultra-low-cost, low-voltage NVRAM to complement Padauk MCUs? - Page 1
Forum section: electronics / general

author: I wanted a rude username
author_rank: Frequent Contributor
timestamp: November 02, 2019, 11:58:42 pm
content: Some applications need a comparatively large amount of static data, even if the program memory and RAM requirements are otherwise small.However, there seems to be a relatively high price floor on even the smallest 256 kb (32 kB) SOP-8 flash chips that can run at the full range of microcontroller voltages, around 25¢. Maybe I'm spoilt by these new sub-10¢ MCUs, but it seems like the flash, being comparatively simple, should be cheaper.Are there any lower cost options for small non-volatile memories of any technology, in any package, say between 64 and 512 kb (8 - 64 kB)? I would like it to be readable down to 1.8 V, but it's fine if it needs a higher voltage for programming.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 03, 2019, 01:03:22 am
content: Quote from: I wanted a rude username on November 02, 2019, 11:58:42 pmThe sub-10c MCUs are generally not flash, or very small flash.Part of the issue with 32kB parts, is they also tend to creep-up other specs too, and that bumps the price.You can get serial EEPROM quite cheap, I see lcsc haveFT24C64A-ESR-T 2500+ $0.0554 &BL24C128A-PARC 1000+$0.0774BL24C256A-PARC 1000+ $0.0878or FlashP25Q40H-TSH-IR 2500+ $0.0629

author: I wanted a rude username
author_rank: Frequent Contributor
timestamp: November 03, 2019, 02:12:30 am
content: Thanks, good to know that the problem was with my inferior search strategy and not with the market.The 128 kbFT24C128Ais actually 0.1¢ cheaper than its 64 kb brother.
SDCARD STM32f030k - Page 1
Forum section: electronics / general

author: alizare368
author_rank: Regular Contributor
timestamp: November 02, 2019, 02:01:53 pm
content: Hi everybodyI want to launch SD card with STM32f030k ,and I connected the pins like this.SDcard pin number MCUpin3(MOSI) A74(POWER) 3.3v5(CLK) A56(GND) GND7(MISO) A62(CS) A0when the program reaches this line (myfres=disk_initialize(0).Inter this part.this function is in the mmc.cCode:staticvoid power_on (void){for (Timer1 =3; Timer1; );/* Wait for 30ms */}And stays there.This is my code:Code:#include "main.h"/* USER CODE BEGIN Includes */#include "stdio.h"#include "low_level.h"#include "ff.h"#include "diskio.h"/* USER CODE END Includes *//* USER CODE BEGIN 0 */FATFS fs;FIL myfile;#define sample_no 100static uint16_t sai_buf;/* USER CODE END 0 */int main(void){/* USER CODE BEGIN 1 */static FRESULT myfres=1;uint32_t bt;/* USER CODE END 1 *//* USER CODE BEGIN 2 */myfres=disk_initialize(0);myfres=f_mount(0, &fs);myfres=f_open(&myfile, "1.wav",FA_READ);myfres=f_read(&myfile,&sai_buf,sample_no,&bt);myfres=f_read(&myfile,&sai_buf,sample_no,&bt);/* USER CODE END 2 */while (1){}}this code working for stm32f401 ,but I don't know why it doesn't work for stm32f030k ?
u8g library - Page 1
Forum section: electronics / general

author: ranganatennakoon
author_rank: Contributor
timestamp: October 31, 2019, 01:36:20 pm
content: Does anyone know about U8G library display clear functionshttps://github.com/olikraus/u8glib/wiki/tmenu

author: jackthomson41
author_rank: Regular Contributor
timestamp: November 01, 2019, 12:36:06 am
content: There is no clear function in u8g library. You need to overwrite the old screen.Or you can also set the color index to zero and draw a box the size of the screen. This clears everything that was displayed. You must return the color index to one in a separate page and you can go ahead and display something again. TFT LCDs are too difficult to handle that's why I always preferLCD 16x2.u8g.setColorIndex(0);u8g.drawBox(1, 1, 64, 128);

author: ranganatennakoon
author_rank: Contributor
timestamp: November 01, 2019, 09:12:15 am
content: yes i got it thanks !
TFT LCD,Parallel RGB (1 ch, 8-bit), 40 pins? - Page 1
Forum section: electronics / general

author: MT
author_rank: Super Contributor
timestamp: October 23, 2019, 10:21:46 pm
content: What kind of interface is a:...Parallel RGB (1 ch, 8-bit), 40 pins...Something that a STM32F4xx can drive via its LCD controller?I cant find a datasheet .http://www.lcd-source.com/Product_Overview_Samsung_LMS430HF20

author: langwadt
author_rank: Super Contributor
timestamp: October 23, 2019, 10:27:51 pm
content: Quote from: MT on October 23, 2019, 10:21:46 pmI'd expect so, probably the usual Parallel RGB with 8 bit per color

author: thm_w
author_rank: Super Contributor
timestamp: October 23, 2019, 10:41:42 pm
content: Looks similar to this, you can see the pinout below:https://ronboelectronics.en.made-in-china.com/product/FsmJBYRhXQcw/China-4-3-480X272-RGB-40pin-IC-Ili6480h-Luminance-300-TFT-LCD-Display.html

author: MT
author_rank: Super Contributor
timestamp: October 23, 2019, 10:47:01 pm
content: Thanks, that looks promising, i got old of a couple of (battery dead but working) GPS units with these LCD's in.the GPS is based on Samsung S3C2412 XL-26..

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 23, 2019, 10:59:38 pm
content: Quote from: MT on October 23, 2019, 10:21:46 pmI don't know. Can the STM32F4 pump out 24-bit of data in parallel at the pixel rate while handling the sync signals? Can its LCD controller really do this?

author: MT
author_rank: Super Contributor
timestamp: October 23, 2019, 11:27:01 pm
content: STM32F429 have all the signals and the Disco dev board have a smaller RGB TFT LCD, but i have no idea if its power ful enough for this LCD?!

author: langwadt
author_rank: Super Contributor
timestamp: October 23, 2019, 11:35:00 pm
content: Quote from: SiliconWizard on October 23, 2019, 10:59:38 pmhttps://www.st.com/content/ccc/resource/technical/document/application_note/group0/25/ca/f9/b4/ae/fc/4e/1e/DM00287603/files/DM00287603.pdf/jcr:content/translations/en.DM00287603.pdf

author: TassiloH
author_rank: Regular Contributor
timestamp: October 31, 2019, 06:29:35 pm
content: The STM32F4xx with dispay controller can handle this, but you will need external RAM if you want to use 16-bit color or better. I think the LCD controller has an 8-bit mode (256 colors) with a color-lookup table which would just fit into the available memory (128K needed).For a 480x272 display I'd recommend the STM32F7xx series (ST32F767), they have enough internal RAM (512k) to handle this display in 16-bit color (you'll need 256K display RAM for that) and are not much different to use.
STM32F030K SD CARD  - Page 1
Forum section: electronics / general

author: alizare368
author_rank: Regular Contributor
timestamp: October 29, 2019, 05:45:51 am
content: Hi everyoneI want to launch SD card with STM32f030k ,and I connected the pins like this.SDcard pin number MCUpin3(MOSI) A04(POWER)5(CLK) A16(GND)7(MISO) A2when the program reaches this line (myfres=disk_initialize(0);).Inter this part.this function is in the mmc.c.Code:staticvoid power_on (void){for (Timer1 =3; Timer1; );/* Wait for 30ms */}And stays there.This is my code:Code:#include "main.h"/* USER CODE BEGIN Includes */#include "stdio.h"#include "low_level.h"#include "ff.h"#include "diskio.h"/* USER CODE END Includes *//* USER CODE BEGIN 0 */FATFS fs;FIL myfile;#define sample_no 100static uint16_t sai_buf;/* USER CODE END 0 */int main(void){/* USER CODE BEGIN 1 */static FRESULT myfres=1;uint32_t bt;/* USER CODE END 1 *//* USER CODE BEGIN 2 */myfres=disk_initialize(0);myfres=f_mount(0, &fs);myfres=f_open(&myfile, "1.wav",FA_READ);myfres=f_read(&myfile,&sai_buf,sample_no,&bt);myfres=f_read(&myfile,&sai_buf,sample_no,&bt);/* USER CODE END 2 */while (1){}}Do you have any idea??

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: October 29, 2019, 07:12:04 am
content: What in any of the code is setting Timer1 to any value other than 3, and are you sure it's being called?Things to think about later: What about the CS pin?

author: alizare368
author_rank: Regular Contributor
timestamp: October 31, 2019, 12:34:18 pm
content: Hithis code working for stm32f401 ,but I don't know why it doesn't work for stm32f030k ?the CS pin is connected to PB0 , and PB0 is output.
Urgent help for an Arduino project - Page 1
Forum section: electronics / general

author: srsdesign
author_rank: Newbie
timestamp: October 30, 2019, 03:10:16 pm
content: Hi Everyone,Ok, slightly panicking here as I've been dumped a task that I have to get done for Friday and I'm a total noobie!!My challenge is I need to make a unit that has 4 x RGB LED tape runs that will be lit pink, then when a button is pressed each run goes yellow in steps from the outer one to the inner one so going from 1 - 2 - 3 - 4 (see attached diagram) and also a meter needle starts in the center and waivers left and right then when the last LED run is yellow the needle will either go to the left or right.I have gather some info online to order some components as in Arduino's and RFP30N06LE 30A 60V mosfets, arcade style button and 28byj-48 5v stepper motors and controller boards. Not sure on the resistor values needed either.So is this achievable with one Arduino and available ports, if not might have to join the LED tape runs 1 & 2 together?Any help and pointers desperately appreciated on the circuit and coding.!!Fire any questions at me you may need.Hopefully yours,Stuart

author: StillTrying
author_rank: Super Contributor
timestamp: October 30, 2019, 03:41:39 pm
content: You seem to have made a good start but your chances of doing it all in one day are nil.

author: srsdesign
author_rank: Newbie
timestamp: October 30, 2019, 03:55:16 pm
content: Well I do like a challenge and I have some of Friday too!!

author: StillTrying
author_rank: Super Contributor
timestamp: October 30, 2019, 05:23:53 pm
content: You should be just about adding the finishing touches to the software now.Have you counted how many digital outputs you need, is there only one stepper motor, I don't know how manyoutputsdigital inputs its board needs.

author: jackthomson41
author_rank: Regular Contributor
timestamp: October 31, 2019, 01:36:15 am
content: Quote from: srsdesign on October 30, 2019, 03:55:16 pmYou should try it step by step, can't do the whole in one day, you can start with interfacing steppers withMicrocontrollersfirst. Then work with RGB LEDs make them work.Once both are working then you can combine them and can place different checks etc.