Author Topic: Going from Arduino Uno / IDE to plain C / breadboard  (Read 4531 times)

0 Members and 2 Guests are viewing this topic.

Offline admiralk

  • Regular Contributor
  • *
  • Posts: 178
  • Country: us
Re: Going from Arduino Uno / IDE to plain C / breadboard
« Reply #25 on: November 04, 2021, 08:46:32 pm »
Maybe I should've started even simpler :) I thought it would valuable to go start with a simpler 8bit microcontroller like the AVRs.

You cannot get much simpler than AVR, there is virtually no setup involved. In the videos I posted, he shows you how to dig through the datasheet to find what you need, so it is easy to adapt to whatever AVR you have on hand.

When you are ready to step up, I would suggest ARM over an ESP32. Nucleo boards are dirt cheap considering the programmer is built in.
 

Offline Rooster CogburnTopic starter

  • Regular Contributor
  • *
  • Posts: 188
  • Country: de
Re: Going from Arduino Uno / IDE to plain C / breadboard
« Reply #26 on: November 05, 2021, 12:26:06 am »
I watched the first few videos from the playlist you suggested, thanks again. I'm quite suprised that Atmel Studio looks decent. When I heard about an IDE made by a microcontroller manufacturer I expected the worst, but it's actually based on Visual Studio and seems usable, probably a decent option if you're on Windows.

I've never heard of the microarchitecture of the ESP32 CPU core before, guess it was a lot cheaper to license than ARM.

Haven't heard of Nucleo boards, but at ~35EUR they seem quite expensive compared to the <4EUR RPi Pico or ~6EUR ESP32 boards.
 

Offline admiralk

  • Regular Contributor
  • *
  • Posts: 178
  • Country: us
Re: Going from Arduino Uno / IDE to plain C / breadboard
« Reply #27 on: November 06, 2021, 03:05:28 am »
I like VS, so AS is a no brainer to me, although I tend to use Qt Creator for PC projects.

I could be missing something, but I have not seen an ESP32 that did not have integrated wireless. Unless you are aiming for wireless, those resources could be put to better use.   I never had much interest in PIs, my impression has always been they are just mini PCs, so cannot say anything about them.

The last time I looked at a Nucleo board, a couple days ago, it was $13 USD and only available in Europe from RS. Actually I just checked and RS does not seem to want to deal with America, at least from the ST link, but they list it @ $13. https://www.st.com/en/evaluation-tools/nucleo-f401re.html#sample-buy

<edit> Oh yea, that involves yet another IDE, but what does not. </edit>
« Last Edit: November 06, 2021, 03:12:11 am by admiralk »
 

Offline Rooster CogburnTopic starter

  • Regular Contributor
  • *
  • Posts: 188
  • Country: de
Re: Going from Arduino Uno / IDE to plain C / breadboard
« Reply #28 on: November 06, 2021, 11:22:17 am »
These days I'm mostly Mac/Linux but I've used VS for years and also quite like it, great to see this option exists!

The normal RPis are just mini Linux PCs with the addition of a GPIO header that can do PWM, UART, I2C and SPI and some interfaces for cameras and displays. The RPi Pico is a custom designed ARM based microcontroller with a <4EUR dev board and <2EUR chips, so I think it's quite interesting. Considering how dirt cheap the ESP32 is I'm not sure the wireless going to waste is much of an issue. I know of some ESP32 based projects that only used the WiFi to allow for easy firmware update.

btw, RS seems to be the only 'big' distributor in the sense of Mouser/Digikey here in Europe, the kind of place that basically got everything. I remember ordering from them quite a bit in the early 2000s, but now it seems they only accept business customers. They have a non-business site, but it's pretty terrible and lots of things don't seem to be available there. Hm, wish I could buy there!
 

Offline Rooster CogburnTopic starter

  • Regular Contributor
  • *
  • Posts: 188
  • Country: de
Re: Going from Arduino Uno / IDE to plain C / breadboard
« Reply #29 on: November 06, 2021, 09:03:11 pm »
btw, got my Pololu programmer today. I didn't do much with it yet, but it seems great. There's extensive and quality documentation, software for Windows, Linux and OS X, command line and GUI tools to configure the programmer, it does both AVR ISP and Serial, autodetects 3.3V vs 5V supply voltage and can be configured to output either, plenty of feedback about the USB connection, voltage supply, programming status etc. from the LEDs. Seems like a very well thought out device with lots of features and considering I paid like 11EUR shipped I'm extremely happy with it.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4040
  • Country: nz
Re: Going from Arduino Uno / IDE to plain C / breadboard
« Reply #30 on: November 06, 2021, 10:51:18 pm »
Maybe I should've started even simpler :) I thought it would valuable to go start with a simpler 8bit microcontroller like the AVRs.

You can't get simpler than an AVR! Anything else is far more complex both electrically, and software-wise to initialise if you don't just use someone's library to do it for you.

With the ATTiny85, for example, you just need to connect GND and VCC and it will start up and run at 1 MHz. Connect the RESET and SPI pins to your Uno running ArduinoISP and you've got it programmed.

The Atmega328 can also be used from its internal 8 MHz oscillator without any external components. You need to connect GND to pins 8 and 22, and VCC to pins 7 and 20 as the 328 powers the analog and digital parts of the chip separately.

Of course the clock frequencies will not be as exact as using a crystal, but it often doesn't matter. They're plenty good enough for generating in-tolerance UART baud rates or the timings to drive a string of WS281[23]B? LEDs.

If you're happy with the default clock speed then your program can just launch straight into configuring whatever GPIOs you need. Nothing else needed unless you want to.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4040
  • Country: nz
Re: Going from Arduino Uno / IDE to plain C / breadboard
« Reply #31 on: November 06, 2021, 11:00:17 pm »
I've never heard of the microarchitecture of the ESP32 CPU core before, guess it was a lot cheaper to license than ARM.

I think you mean Instruction Set Architecture (ISA), not microarchitecture. CPUs with the same ISA can have dozens of different microarchitectures.

Older ESP32 use xtensa, a fairly popular ISA now owned by chip design tools company Cadence. Its main claim to fame is that Cadence allow and encourage and provide tools for adding custom instructions to the CPU. It's a fairly generic RISC design with 16 GPRs and two instruction lengths of 16 bits and (unusually) 24 bits.

New ESP32 chips use RISC-V cores, or in one intermediate model a fast(ish) xtensa core and a low power RISC-V core.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf