This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Few beginner questions - from AVR to ARM

hi,

after some time i think its time to learn arm programming, i used to program for avr, (im mainly a pc programmer ! young one )

i got an Raspberry pi model b+. but i don't want to use it for making fun stuff or hobby, i want to do real programming(not that python and pi are not real programming i can't explain what i mean) , so i can work somewhere(i don't want to but example of what i mean, im not looking to make stuff, im looking to learn!!!) or make products! (like nest self learning thermostat or the Parrot ar.drone)

raspberry pi has an os and its a big boards and has unneeded stuff so i don't want to use it on my final product (release it with a pi inside of it!)

like in avr i wrote my c program for my chip on breadboard, or an arduino, after that i just installed the final version into  a chip ans inserted it into a final cricut , but not the whole arduino! (like lets say i made an automatic cat feeder and released it for public!!! )

i want to do the same, so my question is:

how can i start it? Do i need to know Assembly?  i only know a little bit of PC assembly, it sounds cool


i heard different MPU/MCU's require learning the whole thing again, i may use different stuff on different projects, that means i have to learn it again for each project?!

lets say my goal is to make AR.Drone from scratch, by buying motors the chips and ect, but i want to prototype it with pi first, and the OS and other stuff just require battery and waste resources , how can i do it?!

so what should i do/learn to make an AR.Drone?! (i know its not like i wake up and decide to build a time travel machine but i will learn what's necessary because i have time and im looking to learn !)

sorry if this question sounds stupid but i have been really confused these days so i thought its good to make a thread!

EDIT:

let me summirize it a little !

Summary:

im moving from AVR programming to ARM,

what steps i should take? what should i learn?

i want to use ARM for making products and devices , i already bought an pi to prototype before i can make it a product , in its own board with other stuff in the board

a good example of what i want is ar.drone !

Parents
  • The LPC1768 Header Board looks good for using on breadboards. It seems there is a on-board voltage regulator, which means it's probably powered from the USB interface of a computer (or a 5V MP3-player charger with USB-connector).

    I think you can use FlashMagic too for flash-programming this board.

    If not, you will always have the UART option - it's good to have more than one option, in order to get started quickly.

    As you can see, there's a large black connector on the board as well. This is a JTAG and SWD connector, which is also used for flash-programming the lpc1768 on the board, that means you can choose which way you want to flash-program the board yourself.

    In addition to the above, notice that each pin has the pin name written next to it, so it's easy to find the signals.

    The designer also took some time to place the pins in a nice order.

    So the board gives you freedom and good possibilities; I believe it would be a good purchase.

    You can program the LPC1768 in C, C++ or assembler if you prefer. The choice is all yours.

    If you decide to go for programming in assembly language, you will probably find the documentation at ARM Information Center interesting (Click Cortex-M series processors, then Cortex-M3 and r2p1.

    I would say that the programming is very much the same for all chp-family members of one type, whichever board it's on.

    When I say chip-family members, I mean...

    • LPC175x and LPC176x is one family.
    • LPC177x and LPC178x is a different family.

    This is because there is a 'core' on the chip, which is the instruction set, but each microcontroller family may have additional peripherals (functions).

    For instance, one microcontroller family may have one 10-channel ADC, while another chip-family might have no ADC.

    Or... one might have two 16-bit timers, another might have four 32-bit timers; setting up a timer would then require different code for the 32-bit timer, when compared to the code for the 16-bit timer.

    In some cases, you might need the 32-bit timer because a 16-bit timer isn't enough in the particular case.

    To make the answer more clear: Microcontrollers from NXP would be different from microcontrollers from Texas Instruments or ST-Microelectronics.

    -Even microcontrollers from the same manufacturer would be different.

    However... Writing code for a Cortex-M3 from Texas Instruments wouldn't be difficult if you've already written some code for one from NXP.

    You will always need to read the documentation (eg. datasheet and User's Manual) for your microcontroller.

    See for instance the datasheet and UM10360 for the LPC175x/6x family.

    -But I would like to say that the LPC1768 is a good choice, it has a fair amount of features. You will probably not be using all features in one design.

    It does not support external SRAM or SDRAM, and it does not have a built-in LCD-controller like the LPC1788, however, there are a number of LCD displays that do not require a controller, so you would be able to write code that could show something on for instance a SPI-based or parallel-interface LCD-screen instead.

Reply
  • The LPC1768 Header Board looks good for using on breadboards. It seems there is a on-board voltage regulator, which means it's probably powered from the USB interface of a computer (or a 5V MP3-player charger with USB-connector).

    I think you can use FlashMagic too for flash-programming this board.

    If not, you will always have the UART option - it's good to have more than one option, in order to get started quickly.

    As you can see, there's a large black connector on the board as well. This is a JTAG and SWD connector, which is also used for flash-programming the lpc1768 on the board, that means you can choose which way you want to flash-program the board yourself.

    In addition to the above, notice that each pin has the pin name written next to it, so it's easy to find the signals.

    The designer also took some time to place the pins in a nice order.

    So the board gives you freedom and good possibilities; I believe it would be a good purchase.

    You can program the LPC1768 in C, C++ or assembler if you prefer. The choice is all yours.

    If you decide to go for programming in assembly language, you will probably find the documentation at ARM Information Center interesting (Click Cortex-M series processors, then Cortex-M3 and r2p1.

    I would say that the programming is very much the same for all chp-family members of one type, whichever board it's on.

    When I say chip-family members, I mean...

    • LPC175x and LPC176x is one family.
    • LPC177x and LPC178x is a different family.

    This is because there is a 'core' on the chip, which is the instruction set, but each microcontroller family may have additional peripherals (functions).

    For instance, one microcontroller family may have one 10-channel ADC, while another chip-family might have no ADC.

    Or... one might have two 16-bit timers, another might have four 32-bit timers; setting up a timer would then require different code for the 32-bit timer, when compared to the code for the 16-bit timer.

    In some cases, you might need the 32-bit timer because a 16-bit timer isn't enough in the particular case.

    To make the answer more clear: Microcontrollers from NXP would be different from microcontrollers from Texas Instruments or ST-Microelectronics.

    -Even microcontrollers from the same manufacturer would be different.

    However... Writing code for a Cortex-M3 from Texas Instruments wouldn't be difficult if you've already written some code for one from NXP.

    You will always need to read the documentation (eg. datasheet and User's Manual) for your microcontroller.

    See for instance the datasheet and UM10360 for the LPC175x/6x family.

    -But I would like to say that the LPC1768 is a good choice, it has a fair amount of features. You will probably not be using all features in one design.

    It does not support external SRAM or SDRAM, and it does not have a built-in LCD-controller like the LPC1788, however, there are a number of LCD displays that do not require a controller, so you would be able to write code that could show something on for instance a SPI-based or parallel-interface LCD-screen instead.

Children
  • Thanks a lot

    it sounds like  only need a 1~hour study to learn how to program other Chip (like when some timers in AVR had diffrent bits , it only took me 15mins to figure our how to use the other one (not only timer) from datasheet

    also i will program on c:) and maybe use inline assembly sometimes !

    so now i have 2 last final question:

              i can't install linux on it right? becasue i might need to stream video to PC and it sounds pretty hard without Linux helping me i will learn A when i needed that ! or use samba (sounds like Raspberry pi will help me here )

        im googling myself but if you know any good websites or book to learn how to use the LPC1768(i guess) ?

    i found some persian tutorials there but i feel uncomfortable reading persian tutorials !!!