Retired Wannabee.

Discussion in 'Embedded Systems and Microcontrollers' started by BR-549, Aug 30, 2015.

  1. BR-549

    Thread Starter Well-Known Member

    Sep 22, 2013
    1,999
    389
    The last time I talked to a chip directly was in the early 80s. A 6502....assembly language.
    I loved it.

    I am retired and this is for personal interest only. But I would like to play with the new high speed ADCs.

    A few weeks ago I read a data sheet on an 8 bit atmel avr. I was impressed. Not real fast and powerful, but very versatile.

    The first recommendation I need is for a good text for the C language.



    The next recommendation I need is which chip? And it does not need to be atmel or avr.

    With the cost of development boards, even the high speed 32 bit units are cheap. Some ~ $20 to $30.

    Should I start out with 8 bit, or go with a new chip?

    How much weight do I put in the IDE?

    How much weight do I put on established code(library's)?

    I bought an Arduino, but I don’t want to use the Arduino IDE.

    I don’t want a board dependent IDE.

    Any and all suggestions or recommendations are appreciated.

    Thank you.
     
  2. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,909
    2,169
    It doesn't sound like to want to go full low-level so I would buy a system with a 32bit machine with a good low level library that can be used with languages other than C in the beginning. The Raspberry PI2 is more expensive for a development system but it has an OS that isolates you from all the low-level details but still allows you to talk to things like high speed ADCs using i2c or spi with expansion boards and is a general purpose computer vs a true embedded system. If you want to use a uC I'm biased on what brand to use.
     
  3. BR-549

    Thread Starter Well-Known Member

    Sep 22, 2013
    1,999
    389
    I am most interested in your bias. I do want to go full low level.

    I did download a pic data sheet. However, I couldn't find any general registers in it. Do you have to use the accumulators for all operations? Or do you just define a memory space as a register?

    I could not follow the pic architecture.

    I prefer the assembly language, but I have read that everything is done in C. Is that true? What other language can be used, if not C?

    Do they have assembly language libraries?
     
  4. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,909
    2,169
    If you want to go full low level then I would recommend starting at the PIC18 Kseries device level for large program memory and sram that makes programming them in C much easier. No ADC there is true high speed but ~100k sample per second at 12bits is possible on the high end of that series. (a PIC32 can have a maximum sampling rate of ~1000k samples per second with DMA).

    The PIC16/18 architecture is archaic, strange and full of gotchas but it's simple. If you prefer the assembly language then learn the pic instruction set and use it but if you use mainly C the code you write can be ported to other architectures without out too much problem if you write it correctly.

    There are good applications libraries for C but for ASM I don't know as that's not my bag man.
     
  5. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,550
    2,373
    I hadn't really done any programming since Assembly on the 8085, this site got me up to speed on the pic devices, and I have since graduated to the 18F and the 18F23k22 in particular.
    http://www.winpicprog.co.uk/pic_tutorial.htm
    the WREG has replaced the Accumulator.
    If you progress from Absolute compiling to relative, you can build a library of routines instead of re-inventing the wheel.
    Max.
     
  6. BR-549

    Thread Starter Well-Known Member

    Sep 22, 2013
    1,999
    389
    Thanks, I have never studied or used C. Would you fellows recommend a good read?
     
  7. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,314
    886
    If you want chips with an architecture that makes a LOT more sense, check out the 16-bit PICs such as the PIC24 and dsPIC30/33 series. Sixteen, 16-bit general registers, most instructions can operate on almost any register(s), a "traditional" branch-on-condition set of branch instructions, high speed (up to 70 MIPs for the dsPIC33EP chips), plenty of powerful peripherals, and cheap.

    And in my experience, quite easy to program in assembly language, even though hardly anyone else seems to do that. Like you, I'm going to have to learn C at some point; but so far, I've been able to do almost everything I've needed to do with assembler.
     
  8. BR-549

    Thread Starter Well-Known Member

    Sep 22, 2013
    1,999
    389
    Thanks, OB, what IDE are you using?
     
  9. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,314
    886
    I've been using MPLAB 8.92, lately learning to use MPLAB-X (on my Mac).
     
  10. nerdegutta

    Moderator

    Dec 15, 2009
    2,515
    785
    In MPLAB you can install several different compilers. Assembly is one of them.
     
  11. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,909
    2,169
  12. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,605
    Since you are writing your code in C things like register organization or bits in the bus are really sort of irrelevant.

    Pick some chip with the most useful features (such as A2D or PWM or I2C or whatever) that make your nether regions pucker and get that chip.
     
  13. be80be

    Senior Member

    Jul 5, 2008
    431
    57
    I'd keep the arduino you can use it to progam avr's.. Also you can use winAVR to write programs in C
     
  14. BR-549

    Thread Starter Well-Known Member

    Sep 22, 2013
    1,999
    389
    I’ve been reading about C. I’d call it an universal shorthand for the different assemblies. I should have leaned this years ago.

    I just about gave up on circuits, the good parts are too small for me to handle.

    This gives me plenty to learn and play with.

    These Arm chips are interesting, although I’m having a hard time understanding the memory nomenclature. And that makes it hard to follow the indexing modes.

    There’s a lot to catch up on. And I got puckered.

    I ordered a MSP432 Launchpad. 20 bucks, including shipping. I have dicked around with some of the examples and they seem to “build” ok.

    But when I get the board and can see the registers, I should be able to follow that indexing thru.

    The power consumption is unreal. Easily run on a battery. And when you are done building a program, if you want, the programmer will turn off all unused ports and devices to save even more power. On top of several sleep modes.

    Even though I was going to power with a battery, I hadn’t considered power drain.

    So I’ll see what happens.

    I had heard that one can program an AVR thru an Arduino, but I hadn’t heard of WinAVR, thanks.

    I am not opposed to other chips, by any means. If this proves overwhelming, I am only out twenty bucks. And I can only learn from it.

    Still quite interested in the pics and other avrs.
     
  15. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,909
    2,169
    Now you 'see' why 'C' is used.
     
Loading...