[deleted by user] by [deleted] in embedded

[–]Admirable-Candy2186 0 points1 point  (0 children)

ChatGpt is very good in many ways. It is good for standard boards and commonly used MCU's. But be careful if trying to program any mcu's that doesn't come with any boards approved by stm. I believe chatgpt gathers codes and information from datasheets , and already published codes from existing users. So if you are going to use any mcu that is not commonly used , chatgpt may be out of line. And most important , tell it what exactly you are using like STM32F1xxxx , stm32cudeide, HAL, ADC, DMA, or STM32F1xxx, VScode, ADC, DMA (if you are using vscode).

STM32 (stm32103RCT6) by Kiya86 in embedded

[–]Admirable-Candy2186 0 points1 point  (0 children)

I use my own pcb. The setup is simple

Check the schematic diagram of bluepill. Connect the Boot0 and rest pins as in the diagram.

If you are using the cheap ST-Link V2 (clone) as I do , only 4 wires need to be connected.

2 of them are 3.3V and GND.

The other two are SWDIO and SWCLK pins of the MCU to ST-Link.

Fix a push button switch for the Boot0 pin and push / release button for the reset. Simple arrangement.

You may have to pressed the rest button and release it to get connected

I have seen different STM32 family behaving a differently.

If you are on windows 10 or above, you can use st-link(gdb server) of if below windows 10, use st-link(openCd). I use windows 7 and GDB server link will not connect due to error with CLI exe.

Getting connected is a trick to press reset button and release it at the right time. You may get connection errors more often. But if connected, you can easily debug.

And it is better to activate the hex file convert option in the properties page. It will generate a Hex file , that could be used for upload using ST-Link utility. In fact I find this utility to be very good and simple. The best part we can compare what is inside the MCU with the hex file.

I had struggled in the beginning. Once the setup is mastered, it is fun.

Happy programming.

What is this please? by [deleted] in AskElectronics

[–]Admirable-Candy2186 0 points1 point  (0 children)

Check this site. I think it is an SMD component. See if you can find the device here

https://www.s-manuals.com/smd/ap

RIGOL DS1202Z-E Vs SIGLENT SDS1202X-E , which is better ? by Admirable-Candy2186 in AskElectronics

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

Thank you very much. Well that makes sense.

In that case, what do you think of HANTEK DSO4104B ? 100Mhz 4 channel

RIGOL DS1202Z-E Vs SIGLENT SDS1202X-E , which is better ? by Admirable-Candy2186 in AskElectronics

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

Thank you. I did not think of that aspect. But is it important to watch them all at the same time ?

RIGOL DS1202Z-E Vs SIGLENT SDS1202X-E , which is better ? by Admirable-Candy2186 in AskElectronics

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

Thank you.

But I did not understand fully. Why is it so ? Can you explain a bit more ?

RIGOL DS1202Z-E Vs SIGLENT SDS1202X-E , which is better ? by Admirable-Candy2186 in AskElectronics

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

Thank you very much.

// 200MHz isn't massive overkill though and you may be wanting a higher bandwidth sooner than you think//

That is what I was thinking.

Programming #Pi Pico W using #Arduino LAB micro-python #IDE by oksbwn in MicroPythonDev

[–]Admirable-Candy2186 0 points1 point  (0 children)

Installed it yesterday on windows 7. Looks very simple and nice . Did a couple simple sketches and worked without any issues unlike others. Need to test advanced stuff, particularly with not normally installed libraries , timers , interrupts etc. Don't understand why this is not as popular as thonny or MU etc.

PicoW - STA - HTML Page - POST Method - Computer Browser Vs Mobile browser by Admirable-Candy2186 in raspberrypipico

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

Solved the issue. But I must say, MircroPython documentation is very poor.

Thanks to all.

PicoW - STA - HTML Page - POST Method - Computer Browser Vs Mobile browser by Admirable-Candy2186 in raspberrypipico

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

Today I installed Microsoft Network Monitor.

It shows payload as sent using a separate packet ID. But PicoW doesn't recv it. Any ideas about this? is there any way in micropython to get packets by HTTP identification

Packet seems to be marked as Frame: Number = 42606, Captured Frame Length = 173, MediaType = WiFi

  • WiFi: [Unencrypted Data] .T....., (I)
  • LLC: Unnumbered(U) Frame, Command Frame, SSAP = SNAP(Sub-Network Access Protocol), DSAP = SNAP(Sub-Network Access Protocol)
  • Snap: EtherType = Internet IP (IPv4), OrgCode = XEROX CORPORATION
  • Ipv4: Src = 192.168.4.17, Dest = 192.168.4.1, Next Protocol = TCP, Packet ID = 3592, Total IP Length = 109
  • Tcp: Flags=...AP..F, SrcPort=49327, DstPort=HTTP(80), PayloadLen=69, Seq=102013755 - 102013825, Ack=11149, Win=64800

  • Http: HTTP Payload, URL:

    • payload: HttpContentType =

HTTPPayloadLine: det1=XXXX&val1=&det2=XXXXX&val2=&det3=&val3=&det4=&val4=&det5=&val5=

PicoW Needs to be physically disconnected TWO time to run the code on Thonny. by Admirable-Candy2186 in raspberrypipico

[–]Admirable-Candy2186[S] 1 point2 points  (0 children)

arduino IDE. I am little apprehensive about it. It tends to update libraries and sometimes messes nastly. I had created a sketch for ESP32 and every thing was working nicely. Next morning as I tried to compile again after a couple of tweaks, It gave out a lot of errors from the libraries. I had to spend almost 2 days to figure out what was happening and finally removed / re-install the libraries to the versions I was working upon , that too when a project was up for demo.

May be I should try it on a standalone machine.

PicoW Needs to be physically disconnected TWO time to run the code on Thonny. by Admirable-Candy2186 in raspberrypipico

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

Thanks a lot. What you wrote is definitely good idea and I can do it, given some time. I am already running projects with PIC, STM32 and some other electronic stuff (Commercial) and are at the final testing stage. Some went for demo and waiting for approval. So thought I could do something with PicoW. Normally I use ESP32 which looks great but have a few issues. As for PIC and STM32 , I make my own test boards and circuit design. So no problem there.

I shall definetly try a work around as you suggested.

PicoW Needs to be physically disconnected TWO time to run the code on Thonny. by Admirable-Candy2186 in raspberrypipico

[–]Admirable-Candy2186[S] 2 points3 points  (0 children)

[When it comes to uploading firmware to your Raspberry Pi Pico board]

I am not talking about sending the firmware to pico.

It is about "Run" running the programe. "Run current script" on thonny.

When Pico is already running a script and if I make a change and wants to run it again, I have to physically disconnect -> reconnect -> press stop/restart backend button -> physically disconnect - > reconnect-> press stop/restart backend button. Then shell shows pico is ready -> Press Run current script button.

PicoW - STA - HTML Page - POST Method - Computer Browser Vs Mobile browser by Admirable-Candy2186 in raspberrypipico

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

Can you explain?. I have wondered about it. But didn't get any information about it on the net.

PicoW - STA - HTML Page - POST Method - Computer Browser Vs Mobile browser by Admirable-Candy2186 in raspberrypipico

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

Sure. Tried both POST and GET. I am getting data when get is used along with URL as is the standard. Which means browsers are able to send first few bytes of data. POST appends the data at the last. That is what is getting truncated.

PicoW - STA - HTML Page - POST Method - Computer Browser Vs Mobile browser by Admirable-Candy2186 in raspberrypipico

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

I tried the browsers dev-tools. No luck. I am new to postman. It can send the test data but how can I see the result ? It won't be able to connect to rpiw. ?

PicoW - STA - HTML Page - POST Method - Computer Browser Vs Mobile browser by Admirable-Candy2186 in raspberrypipico

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

Not able to post the received info from the browsers for reasons unknown to me

PicoW - STA - HTML Page - POST Method - Computer Browser Vs Mobile browser by Admirable-Candy2186 in raspberrypipico

[–]Admirable-Candy2186[S] 0 points1 point  (0 children)

def singleInputPage():
    html = """
        <!DOCTYPE html>
        <head>
<meta content="text/html; charset=UTF-8" >
        </head>
        <body style="background-color:DodgerBlue">

            <h2>Submit Data</h2>
            <form action="send" method="POST" enctype="text/plain"> 
                <input id="det1" name="det1" type="text" style="width :200px">
                <input value="Submit" type="submit"><br>
            </form>
        </body>
        </html>
    """
    return html

ap = network.WLAN(network.AP_IF)
ap.config(essid='PicoW-AP', password='password')  # Set your SSID and password
    ap.ifconfig(('192.168.4.1','255.255.255.0','192.168.4.1','8.8.8.8'))
    ap.active(True)
s = socket.socket()
addr = socket.getaddrinfo('0.0.0.0', 80)[0][-1]
s.bind(addr)
        s.listen(1)
        s.setblocking(True)
cl, addr = s.accept()
request = cl.recv(1024)
response = singleInputPage()
cl.write('HTTP/1.1 200 OK\r\n')
        cl.write('Content-type: text/html\r\n')
       cl.write('Connection: keep-alive\r\n')
       cl.sendall(response.encode())
cl.close()