Thread: microcontroller to C++

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    6

    microcontroller to C++

    hey guys! i just wanna ask... how do i import datas from an ADC zilog Z8F6421 microcontroller to C++ program... i need the digital data from the microcontroller to be used in my C++ program...

    Thanks in advance!

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,739
    Either use the OS's interface for microcontrollers ( don't ask me if it has any ) or use assembly.
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    6
    im really new in this field because this is our thesis... can you elaborate more on the assembly part and the OS part....

    thanks again!

  4. #4
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,739
    Every OS provides an interface for various peripherals ( scanner, printer etc ). You should do some search to find out if your OS supports microcontrollers.

    Assembly is difficult and unportable. It is speech with the CPU at the lowest level. You should find out your computers instruction set ( assembly language ) and produce appropriate ASM code.

    ( Although with the latter you'll also need your microcontrollers documentation )
    Devoted my life to programming...

  5. #5
    Registered User
    Join Date
    Feb 2011
    Posts
    6
    so do i need to convert my C++ program to assembly code??

    if so, after converting, what will i do to get the datas from the microcontroller to my C++ program?

  6. #6
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,739
    Quote Originally Posted by ticrou View Post
    so do i need to convert my C++ program to assembly code??
    Have you tried looking for the OS's interface already?!

    Quote Originally Posted by ticrou View Post
    if so, after converting, what will i do to get the datas from the microcontroller to my C++ program?
    Like i said, you're gonna have to get a hold of your microcontroller's documentation for that.

    EDIT: You don't have to convert the whole thing to assembly, Microsoft and GNU compilers support inline assembly.
    Devoted my life to programming...

  7. #7
    Registered User
    Join Date
    Feb 2011
    Posts
    6

    Unhappy

    how do i look for the OS's interface??

    real sorry... complete newb

  8. #8
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,739
    Quote Originally Posted by ticrou View Post
    how do i look for the OS's interface??

    real sorry... complete newb
    You search for the appropriate documentation, i think...

    Sorry, i've never encountered this problem in my programming life.
    Devoted my life to programming...

  9. #9
    ...and never returned. StainedBlue's Avatar
    Join Date
    Aug 2009
    Posts
    168
    Google's first hit for the microcontroller turned up a PDF documentation. Inside the PDF document, it mentions Zilog IDE for "in-circuit programming". The site for the Zilog IDE mentions it comes with a C compiler. I would start by reading the documentation (8 pages), downloading the IDE, and asking questions in the C forum from that point.

    And consider that a good thing, I've worked with some that only supported BASIC.
    goto( comeFrom() );

  10. #10
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,739
    There you go! It only needs some ( much ) search.
    Devoted my life to programming...

  11. #11
    Registered User
    Join Date
    Jun 2010
    Location
    Michigan, USA
    Posts
    143
    You have gotten some good advice.

    What you need are some terms for what you are trying to do. You are about to do in American is called "embedded software", "embdded software development" or "real time software". Those terms should allow you to get some information about the basics.

    Does your educational institution have a course in either embedded development or real time development?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 11
    Last Post: 02-18-2009, 06:10 AM
  2. Replies: 27
    Last Post: 10-25-2007, 10:47 AM
  3. Programming a PIC 16F84 microcontroller in C
    By Iahim in forum C Programming
    Replies: 1
    Last Post: 05-13-2004, 02:23 PM
  4. C for microcontroller
    By phernyt in forum C Programming
    Replies: 2
    Last Post: 12-08-2001, 01:01 PM
  5. Microcontroller Programming With C
    By Garfield in forum C Programming
    Replies: 20
    Last Post: 11-17-2001, 05:04 PM