Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Micro controller with direct PC interface

Status
Not open for further replies.

Y.li

Member level 2
Joined
Apr 5, 2012
Messages
52
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,649
Hello,

I am looking for any micro controllers which can be directly interfaced with a computer without any requirement for a programmer. Are there are uCs/ PICs which can be interfaced directly with the serial port/ parallel port and be programmed without a programming kit.

Wanted to try out with some uCs before purchasing a programmer.

Thanks for devoting time on a wild guess. :grin:

Y. Li
 
Last edited:

sky_123

Advanced Member level 4
Joined
Feb 26, 2011
Messages
1,170
Helped
279
Reputation
566
Reaction score
273
Trophy points
1,363
Activity points
9,602
Yes there are. Many modern microcontrollers do not need dedicated programmers.
An example is ATmega32u2 which has a USB interface. See attachment for a guide.
Another example is Atmel ARM devices (e.g. AT91SAMx) which have a USB port and bootloader code too.
Even very old microcontrollers like 68HC11 series you could program through the serial port, by first
programming some bootloader which would be responsible for downloading the actual code.
 

Attachments

  • programming_microcontrollers3.pdf
    6.6 MB · Views: 15
  • Like
Reactions: Y.li

    Y.li

    Points: 2
    Helpful Answer Positive Rating

Y.li

Member level 2
Joined
Apr 5, 2012
Messages
52
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,649
Yes there are. Many modern microcontrollers do not need dedicated programmers.
An example is ATmega32u2 which has a USB interface. See attachment for a guide.
Another example is Atmel ARM devices (e.g. AT91SAMx) which have a USB port and bootloader code too.
Even very old microcontrollers like 68HC11 series you could program through the serial port, by first
programming some bootloader which would be responsible for downloading the actual code.

Nice to hear from you. Is this similar to Aurdino board. Also, I am looking for a uC which I can plug in a bred board (maybe with a crystal) and interface it with a PC for programming, so that I can use the uC DIP somewhere .

Thanks,

Y li
 
Last edited:

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,712
Reputation
3,454
Reaction score
1,677
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,376
Use uC with bootloader, and you must program bootloader first, that means you need programmer or to get bootloader pre-programmed uC.
 

    V

    Points: 2
    Helpful Answer Positive Rating

sky_123

Advanced Member level 4
Joined
Feb 26, 2011
Messages
1,170
Helped
279
Reputation
566
Reaction score
273
Trophy points
1,363
Activity points
9,602
Unfortunately I'm only familiar with Atmel devices, but traditional devices like 68HC11 from Motorola did need a bootloader downloaded first, but it was possible through the serial port with that device, so no programmer was required. The serial port would allow the bootloader to be installed into RAM, and it would execute from there. You could create your own bootloader, so that it would accept more code later, and automatically program the EPROM.
With the ATmega32u2 (and presumably some other modern devices devices), there is a bootloader factory-programmed by default, so that as soon as you have the ic, you can connect to a USB connector and use it. The bootloader allows code to be programmed into the device.
With the AT91SAMxx range (or at least some of it), there is a bootloader factory-programmed too, but a short operation needs to be done (hold a pin high for 10 seconds) to enable the bootloader.
So, if you're careful, you can pick a device for which you need no programmer. However, it limits you a bit, but thankfully ISP (in-system programmers) are not that expensive and cover a large range of devices. The Atmel AVR-ISP2 is probably just a few tens of dollars, and can program hundreds of Atmel devices. I'm sure there is something similar for PIC.
I am looking for a uC which I can plug in a bred board (maybe with a crystal) and interface it with a PC for programming, so that I can use the uC DIP somewhere
With the ISP, you can create a breadboard containing your microcontroller (even use a SMD to DIP adapter if you want) and the ISP connector and a crystal if you need it, and it essentially becomes a 'jig' for programming microcontrollers. Once the microcontroller is programmed, you can remove it and use it.
Regarding the Arduino question - I've never used Arduino, but I'm guessing it is a microcontroller pre-programmed with some software to allow it to connect to a PC for Arduino language or whatever. The bootloaders I've referred to allow you to program the microcontroller in any language. I tend to use C for these small microcontrollers.
 
  • Like
Reactions: Y.li

    Y.li

    Points: 2
    Helpful Answer Positive Rating

Y.li

Member level 2
Joined
Apr 5, 2012
Messages
52
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,649
Thanks sky for the detailed explanation. So if I understood correctly, I need to choose an uC which comes with pre-installed bootloader. I also intend to use C as the programming language (that is the only programming language I am aware of ). I found the attachment in your previous post simple & helpful. By any chance, do you have similar tutorials for learning C programming for uCs.

Thanks,
Y. Li
 

nandhu015

Advanced Member level 5
Joined
Feb 11, 2006
Messages
1,965
Helped
300
Reputation
600
Reaction score
224
Trophy points
1,353
Location
India
Activity points
9,845
Renesas microcontrollers dont need a programmer.

Check out Renesas site for more details...
 

sky_123

Advanced Member level 4
Joined
Feb 26, 2011
Messages
1,170
Helped
279
Reputation
566
Reaction score
273
Trophy points
1,363
Activity points
9,602
By any chance, do you have similar tutorials for learning C programming for uCs
Unfortunately I don't, but I'd suggest to run a 'flashing LED' type of program for whichever microcontroller you choose (usually that is the first 'getting started' piece of software, like 'hello world' programs), and then that can be used to assure that the compiler is functioning and that you can successfully download the program to the device and run it.
Personally I learned C by writing code to run on a PC too, so not everything needs to be learned using the microcontroller. To run on a PC, I used the gcc compiler for Linux, or, on Windows, install cygwin and use the gcc from there.
I used two books (neither are cheap, but they are fairly short to read and provide all the knowledge required). They are 'The C Programming Language' and 'Problem Solving and Program Design in C' (older editions of the latter are cheaper; besides, C doesn't change over the years). I don't know of any web resources as good as those books.

Armed with that C knowledge, and knowledge of how to read and write to pins of microcontroller ports, then you are in a good position to write whatever software you need. The pin read/write method is described in the PDF doc earlier.

There is some additional knowledge that is useful relating to 'integrated peripherals' that are in most microcontrollers (such as UART, timers, PWM) but that can come later (and is studied by inspecting the microcontroller datasheet).
 

Y.li

Member level 2
Joined
Apr 5, 2012
Messages
52
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,649
Unfortunately I don't, but I'd suggest to run a 'flashing LED' type of program for whichever microcontroller you choose (usually that is the first 'getting started' piece of software, like 'hello world' programs), and then that can be used to assure that the compiler is functioning and that you can successfully download the program to the device and run it.
Personally I learned C by writing code to run on a PC too, so not everything needs to be learned using the microcontroller. To run on a PC, I used the gcc compiler for Linux, or, on Windows, install cygwin and use the gcc from there.
I used two books (neither are cheap, but they are fairly short to read and provide all the knowledge required). They are 'The C Programming Language' and 'Problem Solving and Program Design in C' (older editions of the latter are cheaper; besides, C doesn't change over the years). I don't know of any web resources as good as those books.

Armed with that C knowledge, and knowledge of how to read and write to pins of microcontroller ports, then you are in a good position to write whatever software you need. The pin read/write method is described in the PDF doc earlier.

There is some additional knowledge that is useful relating to 'integrated peripherals' that are in most microcontrollers (such as UART, timers, PWM) but that can come later (and is studied by inspecting the microcontroller datasheet).

OK.

BTW I was googling on the net. I found about a software Codevision AVR which can be used to program Atmel uCs. Is it possible to use it for practicing C programming for uCs also. That is, can I use it to write a code for LED blinking and see if it works in terms of o/p at ports without actually connecting an Atmel uC. Other than that do you happen to know of any other software which can be used for the same purpose.

Thanks,

Y Li
 

sky_123

Advanced Member level 4
Joined
Feb 26, 2011
Messages
1,170
Helped
279
Reputation
566
Reaction score
273
Trophy points
1,363
Activity points
9,602
I think codevision has been around for a long time, so it is probably fine.
can I use it to write a code for LED blinking and see if it works in terms of o/p at ports without actually connecting an Atmel uC
You're referring to a simulator.
There are different levels of simulation. You're referring to complete machine instruction set simulation. For small microcontrollers, I personally don't
do that, because it is quick to download and directly run on the microcontroller and directly monitor and debug. However, others make use of such simulators,
so you may have your own preference.
If you wish to do such simulation, unfortunately I don't know what tool suite is best.
If I wish to simulate an algorithm (rather than the entire code) I will use other methods. For example by writing some test code targetted for a Windows
PC or Linux PC.

I use IAR (I'm most familiar with that) and the kickstart version is free. I also use GCC for other devices
(it is open source and free). If I wish to simulate an algorithm I will just use GCC targetted for my PC.
Anyway, these are just some suggestions, others may do things differently.
 
  • Like
Reactions: Y.li

    Y.li

    Points: 2
    Helpful Answer Positive Rating

Y.li

Member level 2
Joined
Apr 5, 2012
Messages
52
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,649
I think codevision has been around for a long time, so it is probably fine.

You're referring to a simulator.
There are different levels of simulation. You're referring to complete machine instruction set simulation. For small microcontrollers, I personally don't
do that, because it is quick to download and directly run on the microcontroller and directly monitor and debug. However, others make use of such simulators,
so you may have your own preference.
If you wish to do such simulation, unfortunately I don't know what tool suite is best.
If I wish to simulate an algorithm (rather than the entire code) I will use other methods. For example by writing some test code targetted for a Windows
PC or Linux PC.

I use IAR (I'm most familiar with that) and the kickstart version is free. I also use GCC for other devices
(it is open source and free). If I wish to simulate an algorithm I will just use GCC targetted for my PC.
Anyway, these are just some suggestions, others may do things differently.

Thanks, yes most probably I am looking for a simulator :-D. Can CAVR/IAR be used for this purpose. Also what is meant by an algorithm here.

Thanks,
Y. Li
 

alexxx

Advanced Member level 4
Joined
Apr 17, 2011
Messages
1,013
Helped
273
Reputation
552
Reaction score
270
Trophy points
1,383
Location
Greece
Activity points
7,938
Can CAVR/IAR be used for this purpose.
Yes, IAR offers simulator.


Also what is meant by an algorithm here.
A specific part of the code, with no hardware involved. This is not the definition of algorithm, but "what is meant by an algorithm here".
If you are looking for the actual definition of algorithm.
https://en.wikipedia.org/wiki/Algorithm
 

yamato96

Junior Member level 3
Joined
May 9, 2007
Messages
28
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,283
Activity points
1,459
cant go wrong with picaxe, u just need the mcu, 3 resistors and a rs232 serial port on the pc. Then donwload the free programming editor and start programming in basic.

lots of tutorial, manuals and a good forum also.

i started mcu and digital electr. with just 20 bucks with the picaxe system.

picproto.jpg
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top