Thanks for those last few posts. Quite an education. Exciting stuff except for FTDI - I fell foul of several rogues of those when I ventured in to Prominis.
But I see there are USB sockets on your boards. Did you say it was possible to bootload them? If so with what?
Excuse brevity.. I'll in bed with vertigo.
I think our last few posts should start a new thread!
Excuse brevity.. I'll in bed with vertigo.
I hope that vertigo clears up for you soon. That can certainly ruin your day.
I haven't personally tried the direct USB connections yet. I started out with the FTDI and just never bothered with the USB bootloader.
There are several videos on how to do that and I've actually been thinking about trying one myself.
Here's on video on how to install a bootloader
DroneBot Workshop Robotics Engineer
James
I see you have been busy with posts on this subject since joining the forum, but having grown up on 5v Arduinos I wonder what support is available?
I remember the disappointment when we could not port simple 5v projects over to grandson's 3.3v BBC microbit - not just devices which would not work on the lower voltage, but lack of software support too.
Maybe you could comment on what is said on the Arduino forum https://forum.arduino.cc/index.php?topic=635575.0
But thanks for introducing me to the SMT32.
I remember the disappointment when we could not port simple 5v projects over to grandson's 3.3v BBC microbit - not just devices which would not work on the lower voltage, but lack of software support too.
Yes, there are situations where you may need to change things up a bit when using these boards. Especially with the Black Pill if you were previously using the 5v source from the UNO. You'll need to supply the 5v for your project separately. You'll also need to pay attention to which pins on the Black Pill are 5v tolerant and which are not. So yeah, there are some things you need pay attention to. I haven't personally found this to be a problem. Most of the time I use a separate 5v supply anyway, especially when driving motors, but also for other potentially high current devices.
As far as software support is concerned I haven't personally had any problems with most devices I've been using. But then again, I haven't been working with the latest and greatest devices either, so there may be issues there as well. I did have that one issue that drove me batty for a while. I was trying to use the Adafruit PCA9685 16-channel servo controller with a Blue Pill and couldn't get it to work for the longest time. I had to post a lot of questions on various forums before I finally figured out the problem. It has to do with using uint16_t instead of the regular int type. Once I change the variable type it worked perfectly. ?
So there are issues that come up. I have the determination to solve them and typically won't give up until I do. So far I haven't yet found a project that I wasn't able to covert over to the Pills. But then again, I've been working with fairly popular peripherals. So I may run into problems with some of the more exotic peripherals or some of the newer cutting-edge devices.
But yeah, I'm not trying to sell you on these boards. I'm just sharing my experience with them which so far has been pretty good. I might try that USB bootloader today if I have a chance. I've been wanting to look into that for quite some time but never got a round tuit. Maybe today will be the day?
DroneBot Workshop Robotics Engineer
James
I think our last few posts should start a new thread!
We could start a thread on the Blue and Black Pills (or the STM32F103C8t6 development boards) if you want.
In the meantime here's a link to another bootloader tutorial for the Black Pill: I'm going to see if I can find time to try this today. I've been using the FTDI serial upload method. I'm overdue for switching over to the USB port.
DroneBot Workshop Robotics Engineer
James
Update report on using the USB Bootloader on the Blue Pill.
I used the video I previously posted in THIS POST to install the USB Bootloader. The process is a little bit of a pain due to having to download the flashing software and binary files. You also need to install special drivers to then use it.
So I did all of that today and I was able to upload a program to the Blue Pill via the USB micro port. However, I then realized that I was no longer able to monitor the Serial.print statements on the Serial monitor. I tried rebooting the computer just to be sure all the drivers were installed correctly, but still no serial monitor connection. I have no clue why that is. But I was able to upload a blink program to the Blue Pill using the USB cable and that worked just fine.
In any case, I've decided to just stick with the FTDI serial setup that I've been using. The serial monitor works well with that system. And for me it's no awkward to use. I have it set up so I can program these boards very quickly with it. Also the USB Bootloader takes up 20K of the 64K memory. So I have more program memory to work with when using the FTDI serial board. So I'm just going to stick with that.
But the USB Bootloader can be made to work. I have no clue why it isn't then seeing the serial monitor through the USB connection? But I'd need to get that working before the USB connection would be remotely inviting. Then you still lose 20K of memory to the bootloader. So I'll just stay with the FTDI connection. That works for me. To use the USB Bootloader I would also need to flash all my Pills with the Bootloader software using an FTDI anyway. May as well just use the FTDI.
DroneBot Workshop Robotics Engineer
James
Wow! And yet again wow!
Thanks for exploring that (equally?) torturous route, but what a pity about the serial monitor. I can understand you wanting to stick with FTDI.
But where did you get your FTDI from? When I experimented with Pro Minis I bought four FTDIs from different suppliers and only one worked so I abandoned the project. I think that was at a time when the legit manufacturer produced drivers that overwrote the chip ID in the clones, although I think that they later relented, but too late for me - it felt too risky to forge ahead with only one FTDI - after all, what would I do when that failed? It seemed altogether easier to stick with Nanos and simple USB uploads - perfectly adequate for my RF24 robot cars and MPU6050 handheld controllers.
So much of what appears on these forums is reminiscent of the one step forward two steps back stages of hardware and software development in the 1960's as we got to grips with the early computers!
But where did you get your FTDI from?
I bought all my FTDIs from AliExpress (where I buy almost everything anymore). I've gotten very few bad components from AliExpress.
In fact, last night I accidentally shorted the 3.3v output of an FTDI to ground. I heard a pop and while the board still lit up and was recognized by my computer on the COM port, it would no longer program the STM boards. I was going to toss it but decided to make a closer inspection to see if I could see the damage. Perhaps a trace was burned off?
Strangely it turns out that one of the pins of the 3.3v regulator chip was never soldered from the factory. Apparently the board worked anyway because, although not soldered, the lead was still making contact with the trace on the board. But when I shorted the 3.3v to ground that connection was destroyed (possibly saving the regulator chip itself from being damaged). Anyway, I just soldered that lead (it was a through-hole lead) and now that FTDI is back up and working again. ?
I just ordered 10 more of them for about $17 just because I like keeping my parts drawers full. ?
But overall I haven't had any problems with them at all. Just be sure to always connect them up properly and it should be good. They even have a choice of 5v or 3.3v outputs. I place the jumpers in the 3.3v position when they come in. This way they are all on the low voltage and I only need to switch to 5v on the rare occasions when I might need it. So I'm cool with the FTDIs.
I don't know if there's a way to get the serial monitor to work through the USB port or not. All I know is that it wasn't working for me after following all the instructions in that video.
But like I say, the USB Bootloader takes up 20K of mem, plus you'd need to flash it onto all your boards using an FTDI anyway. So I'm not sure it's worth it. I'll have to ask around and see if I can find a fix for the USB port serial monitor.
UPDATE:
I just looked at the schematic for the Blue Pill. It appears that the USB port is connected to Pins PA11 and PA12. These pins also function as a Rx Tx UART. So it may be possible to set up a soft serial port to print to PA11 and PA12. That would probably work. I'll have to go back and play with that. I'll let you know if that works. I'm working on my new Jeston Nano tonight. ?
DroneBot Workshop Robotics Engineer
James
Interesting one but difficult to explain to grandson.
Also it is not foolproof as I see problems if the 'remove'line is not replaced when the program and filename are changed - the wrong ID would be printed
Interesting one but difficult to explain to grandson.
Also it is not foolproof as I see problems if the 'remove'line is not replaced when the program and filename are changed - the wrong ID would be printed
That's what I was thinking too. Using the EEPROM would be ok for a permanent project, but for development boards I change the program all the time, so just using the method @freddie43 posted works best for me.
DroneBot Workshop Robotics Engineer
James
Certainly, it might be a little more difficult for your grandson to pick up, but once the concept of using objects is understood, I think it is actually better structured and easier to understand in the long run, because you can actually mimic real world objects using the OOP paradigm.
As for removing the line, yes, that's true, but this was just an example to mainly highlight that the EEPROM could be also used, especially when space if often vital in embedded projects... but no reason why such a step could not be automated if you wanted to, so you wouldn't need to manually remove the line each time.
Again... just food for thought 🙂