Maker Pro
Maker Pro

***A stupid question maybe?! --- When you purchase a microcontroller

Henri17

Jan 16, 2017
13
Joined
Jan 16, 2017
Messages
13
Hi all,

Imagine you go to an electronic parts store and you buy a micro-controller lets say an "Atmega328p". Is this chip raw without code or has a bootstrap in it?

What I guess is that this micro comes raw and I need a flasher to put bootstrap in it for the first time.

Not to mention that when you purchase an Uno Arduino it comes with an Atemga328p which is already flashed and all you need is simply use Arduino IDE and a USB cable to upload your own code.

This says that the bootstrap is already loaded in the chip. Am I right?

Would you please share your experience if you have already built a minimum system? I would like to discuss more about the details if possible! :)
 

OBW0549

Jul 5, 2016
157
Joined
Jul 5, 2016
Messages
157
Imagine you go to an electronic parts store and you buy a micro-controller lets say an "Atmega328p". Is this chip raw without code or has a bootstrap in it? What I guess is that this micro comes raw and I need a flasher to put bootstrap in it for the first time.
Correct.

Not to mention that when you purchase an Uno Arduino it comes with an Atemga328p which is already flashed and all you need is simply use Arduino IDE and a USB cable to upload your own code. This says that the bootstrap is already loaded in the chip. Am I right?
Yes.

Would you please share your experience if you have already built a minimum system? I would like to discuss more about the details if possible! :)
I've been building systems with microcontrollers since the mid-1970s beginning with the Intel 4040, and have used many different microcontrollers since then, most recently Microchip's dsPIC33EPxxx series. Every one has its own unique features, depending on the mission. What is it that you want to know?
 

Henri17

Jan 16, 2017
13
Joined
Jan 16, 2017
Messages
13
Correct.


Yes.


I've been building systems with microcontrollers since the mid-1970s beginning with the Intel 4040, and have used many different microcontrollers since then, most recently Microchip's dsPIC33EPxxx series. Every one has its own unique features, depending on the mission. What is it that you want to know?

Thank you for your prompt reply. Then, this is like what exactly I was thinking! I started this topic to simply bring up the ideas of building a minimum system with micros as you said. Therefore, do you mind if I bug you later on and ask you hardware questions?

Basically what I need to know is how to make my own Arduino! I watched the following video and found out that should not be a difficult project. You need to read through the micro's manual and have your own version of PCB eventually!



I used a MAcbook and also a WIN XP 32bit laptop. However, I rather using my Mac or having a VMWARE on my Mac to have access to WIN 7! So as for this, what PCB maker or simulator do you recommend me to use? Would you use Protel? or any products from NI perhaps?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Would you please share your experience if you have already built a minimum system?

I've build a number of small boards which consist of a an ATMega328, a 6 pin header and whatever else is required for power and the interface.

If it's being operated from a suitable voltage, then aside from any interface stuff, that's all you need. You can set up the chip to use the internal RC oscillator, so no need for a crystal.

see here.
 

Henri17

Jan 16, 2017
13
Joined
Jan 16, 2017
Messages
13
I've build a number of small boards which consist of a an ATMega328, a 6 pin header and whatever else is required for power and the interface.

If it's being operated from a suitable voltage, then aside from any interface stuff, that's all you need. You can set up the chip to use the internal RC oscillator, so no need for a crystal.

see here.

Ok cool! Firmware-wise, would you please tell me, what equipment did you use to load the bootstrap to your micro? Did you use a programmer or you used ISP pins of another Arduino to flash the Atmega?
 

OBW0549

Jul 5, 2016
157
Joined
Jul 5, 2016
Messages
157
I started this topic to simply bring up the ideas of building a minimum system with micros as you said. Therefore, do you mind if I bug you later on and ask you hardware questions?
I'll help if I can; just post your questions in these forums.

Basically what I need to know is how to make my own Arduino!
Can't help you much there, as I've never worked with AVR micros and have only played around with Arduino a little bit.

So as for this, what PCB maker or simulator do you recommend me to use? Would you use Protel? or any products from NI perhaps?
I've never used any PCB makers nor have I ever used Protel or any NI products. For simulation I use Microchip's MPLAB IDE for the PIC micros (which is all I work with these days), and for analog simulation I use SPICE.
 

Henri17

Jan 16, 2017
13
Joined
Jan 16, 2017
Messages
13
I'll help if I can; just post your questions in these forums.


Can't help you much there, as I've never worked with AVR micros and have only played around with Arduino a little bit.


I've never used any PCB makers nor have I ever used Protel or any NI products. For simulation I use Microchip's MPLAB IDE for the PIC micros (which is all I work with these days), and for analog simulation I use SPICE.

Ok cool then. For PIC questions or general question of making minimum systems with micro, I will bug you! Many thanks!

BTW, Would you please let me know what did you use to program your PIC micro? What equipment did you use to upload the bootstrap? Is there a specific hardware and software do I need to have for such purposes?
 

OBW0549

Jul 5, 2016
157
Joined
Jul 5, 2016
Messages
157
Ok cool then. For PIC questions or general question of making minimum systems with micro, I will bug you! Many thanks!
Keep in mind that I'm far from the only person here with experience using PICs; many, MANY others have, as well. Just post your questions in the forums and people will answer.

BTW, Would you please let me know what did you use to program your PIC micro?
I use Microchip's MPLAB integrated development environment, along with their PICKIT3 debugging/programming pod. MPLAB (which has been "improved" and it now called MPLAB-X) is a free download at the Microchip website, and the PICKIT3 is also available from them and from multiple distributors, for about $50.

What equipment did you use to upload the bootstrap?
I don't ever bother with a bootloader; I just load the application code directly into the target via ICSP, using the software/hardware noted above.

Is there a specific hardware and software do I need to have for such purposes?
See above.
 

Henri17

Jan 16, 2017
13
Joined
Jan 16, 2017
Messages
13
Keep in mind that I'm far from the only person here with experience using PICs; many, MANY others have, as well. Just post your questions in the forums and people will answer.

No worries! I will post my questions and let everyone answer to them. But your comments and feedback are greatly appreciated as well.


I use Microchip's MPLAB integrated development environment, along with their PICKIT3 debugging/programming pod. MPLAB (which has been "improved" and it now called MPLAB-X) is a free download at the Microchip website, and the PICKIT3 is also available from them and from multiple distributors, for about $50.

I don't ever bother with a bootloader; I just load the application code directly into the target via ICSP, using the software/hardware noted above.

So, this tells me that PIC is slightly different than Atmega as I need to load the firmware to it first. Is that right?

See above.
 

Henri17

Jan 16, 2017
13
Joined
Jan 16, 2017
Messages
13
I'll help if I can; just post your questions in these forums.


Can't help you much there, as I've never worked with AVR micros and have only played around with Arduino a little bit.


I've never used any PCB makers nor have I ever used Protel or any NI products. For simulation I use Microchip's MPLAB IDE for the PIC micros (which is all I work with these days), and for analog simulation I use SPICE.


I guess I was mistaken! you used ICSP to load your bootstarp for the first time. But it is confusing when you said you did not use bootload!
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
I use PicMicro and MPLB IDE and the ICSP is used to load the application program only via Pickit3.
M.
 

OBW0549

Jul 5, 2016
157
Joined
Jul 5, 2016
Messages
157
So, this tells me that PIC is slightly different than Atmega as I need to load the firmware to it first. Is that right?
No.

Bootloader firmware-- whether for PIC or AVR or any other microcontroller-- is only needed in cases where one wants to be able to load the application code via a conventional serial port. Note that the Arduino provides ICSP connections as well, and these are used in the same manner as what I described for the PIC, as an alternative to going through the bootloader via the serial port.

Bootloaders are an optional convenience, not an essential feature.
 
Last edited:

Henri17

Jan 16, 2017
13
Joined
Jan 16, 2017
Messages
13
I use PicMicro and MPLB IDE and the ICSP is used to load the application program only via Pickit3.
M.

Ok here is the question: while using ICSP. Did you use another complete system with PIC to program your own PIC? In other words in order to program an In-System chip we do so. Right? (with SMD not DIP chip)
 

OBW0549

Jul 5, 2016
157
Joined
Jul 5, 2016
Messages
157
I guess I was mistaken! you used ICSP to load your bootstarp for the first time. But it is confusing when you said you did not use bootload!
NO!!

I load the actual target code directly via ICSP, and no bootloader (or "bootstrap", if you will) is EVER involved.
 

OBW0549

Jul 5, 2016
157
Joined
Jul 5, 2016
Messages
157
Ok here is the question: while using ICSP. Did you use another complete system with PIC to program your own PIC? In other words in order to program an In-System chip we do so. Right? (with SMD not DIP chip)
NO!!

No secondary system w/ PIC is involved. I do it EXACTLY as I described above in post #9.
 

Henri17

Jan 16, 2017
13
Joined
Jan 16, 2017
Messages
13
NO!!

No secondary system w/ PIC is involved. I do it EXACTLY as I described above in post #9.

OK, then just to verify and make sure that I understood well, you uploaded the application using the second PIC via ICSP pins and code itself via MPLABX Software?
 

OBW0549

Jul 5, 2016
157
Joined
Jul 5, 2016
Messages
157
OK, then just to verify and make sure that I understood well, you uploaded the application using the second PIC via ICSP pins and code itself via MPLABX Software?
There is no "second PIC". The PICKIT3 debug/programming pod is plugged into an ICSP connector on your target board; your PC or Mac is connected to the PICKIT3 via a USB cable; and the MPLAB development system operates the PICKIT to load your application into your target. It really is as simple as that.

One more time: NO SECOND PIC, NOR ANY BOOTLOADER, IS INVOLVED.
 

Henri17

Jan 16, 2017
13
Joined
Jan 16, 2017
Messages
13
There is no "second PIC". The PICKIT3 debug/programming pod is plugged into an ICSP connector on your target board; your PC or Mac is connected to the PICKIT3 via a USB cable; and the MPLAB development system operates the PICKIT to load your application into your target. It really is as simple as that.

One more time: NO SECOND PIC, NOR ANY BOOTLOADER, IS INVOLVED.

Umm.. sounds straight forward. But to me to understand it better I need to get my hands dirty! It would be more tangible if I do it myself!
 

OBW0549

Jul 5, 2016
157
Joined
Jul 5, 2016
Messages
157
No, it's not JTAG. The PICKIT3 (or any other Microchip ICSP programming device) communicates using a simple proprietary protocol with a small dedicated hardware block inside the PIC which performs the actual programming.

In any case, that's not a detail you need to be concerned with.
 
Top