Thread: microcontroller programming

  1. #1
    Registered User wazilian's Avatar
    Join Date
    Oct 2001
    Posts
    26

    Question microcontroller programming

    anyone out there ever program microcontrollers with C. more specific the Motorola MC68HC912BE. try to use the built in Flash EEPROM to save data, but not the program itself. any thoughts?
    thanx in advance.
    wazilian
    King of Wazil

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    Yes, I've done it, not with that chip, though.

    What kind of hardware are you using to interface the PC with the board that has the microcontroller? If you're using someone else's hardware, you probably need their software unless you know exactly how to do the programming, on a pin by pin basis, from whatever port they use.

    If you're doing this because you can't afford to buy the hardware/software used to program, I've been down that road. You'll need to build hardware, and then write software to flash your file into memory.

    Your choices are between using parallel or serial port interface -- serial makes the computer program slightly simpler, but the actual hardware more involved. Parallel is the best choice, as the slight increase in program complexity is made up for with a decrease in hardware complexity, and all in all, it's easier to write and debug a program than debug a complicated interface.
    Last edited by The V.; 10-11-2001 at 05:09 PM.

  3. #3
    Registered User wazilian's Avatar
    Join Date
    Oct 2001
    Posts
    26
    i'm using IdeaCPU 12 as my editor and Zap as my flash burning software. the cable(parallel) that burns into the flash is the Cable12 BDM Interface cable. not looking for a complete handout here, just some input (wanna do most of it myself so i can learn it, if you know what i mean). i haven't confirmed it yet, but i believe i have erased the flash, now i need to program it. a lot of the examples i've seen and i have with me are engineering code (for lack of the correct term, i think). since my editor is C, this code does not really help me cause i'm using this high-level language. thanx in advance and for the reply.
    wazilian
    King of Wazil

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    Hmm, I guess I'm not clear as to what step of the process you're trying to accomplish.

    Here's how I think of the flow of microcontroller programming:

    Step 1) You write the program you want to flash in a custom programming language (often an ASM or BASIC derivative language)

    Step 2) This is converted into a binary file on your computer, where each instruction is translated into a series of commands.

    Step 3) The binary file on your computer is written to the memory on the microcontroller.

    It sounds to me like you're trying to do step 3) without using their custom software. So, you have a binary file, which you want to copy into the memory?

    I can help you with the parallel port interface, as I have done this before, but you'll need to know exactly how the control signals are sent to the chip. For example, what signal is the "erase" command? The 8 "data" lines from the parallel port should be used, I would imagine, for sending the data. But, you need to know how to send control signals to the chip, as well. The parallel port has 4 control and 5 status lines -- you need to know which of these is used for what.

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 A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 11-18-2001, 02:06 PM