Thread: Embedded C programming

  1. #1
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607

    Embedded C programming

    This question is not my normal type of question but here goes.

    Today a friend of mine approached me about a car project he is working on. He wants to customize it and add all kinds of gadgets to the car. Specifically he wants an LCD monitor to come down out of the roof, he wants speech and speech recognition, as well as the ability to interface with the ECM and display real time engine data on the screen.

    I told him this is not impossible, but it would take a lot of time and research.

    Now Salem is probably one of the only ones who may be able to help me here. I can code any CPU as long as I download the data sheet. Heck most of them come with in-circuit debuggers, linkers, C compilers, and librarians. So I don't even have to do pure assembly...which wouldn't be that hard anyways given their limited instruction set. But building a board to interface with the CPU is not my field of expertise. I also advised my friend that if he wants speech, we would have to invest in a chip that had good addressing capability. The NEC 78K chip may not be able to address more than a couple meg of memory.

    And for speech I would need an onboard DSP with an onboard DMA to stream the memory and use a chip that supported hardware and software interrupts as well as interrupt masking. I told him that he needs far more power here than your average CD player or coffee maker. We are talking about a mini-computer here.

    Now once we get the board designed and up and running (and design a case for it that mounts to our car of choice) the rest is just coding, testing, and then burning the EPROM. That part I can do.

    Any ideas as to where to begin with the circuit board design? I'm a software guy and although I understand how different IC's work and are used....I don't know how to stick them all on a board and get them to work together.

    I think we will probably need at the least a 16-bit CPU capable of addressing 4 meg or more. The only other alternative is to store the speech data in compressed form such as MP3 and play it back. Also we need speech recognition which is probably just another IC with different functions and opcodes to query, get values, and execute speech recognition functions.

    Putting this altogether on a board is more along the lines of electrical engineering more than software engineering.
    Last edited by VirtualAce; 10-11-2006 at 12:13 AM.

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Buy a laptop and embed it in the dash?

    I think you're going to need more than a 16-bit CPU and 4 MB of memory to do speech recognition

  3. #3
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    actually forget the laptop, this would be macmini territory


    You should email this guy
    Last edited by Perspective; 10-11-2006 at 09:22 AM.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > he wants speech and speech recognition
    How many different words or phrases need to be recognised?
    What is going to happen when a word is recognised?
    Will this action have an effect on the car or the driver, and what are the safety implications if it does?

    > as well as the ability to interface with the ECM and display real time engine data on the screen.
    Mmm, ECM means Electronic Counter Measures to me, but that doesn't seem right

    Most of this should be do-able with a few pre-built modules of one sort or another, without having to get out the soldering iron.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    When your friend finishes his project let us all know. He just invented the car of the future and will be a very rich person. And you too if you help him.

    good luck
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    There are cars with these types of features already, mercedes has one called linguatronic.

    http://www.whnet.com/4x4/vrm.html

  7. #7
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    Does size matter? I have an ARM that I'm using in an Embedded application. It is made by Arcom and is called the Viper. It has a minium of 16MB flash, a compact flash card adapter, USB (both host and client), network, video, an AC97 chip (audio, for those not in the know), PC104 for expansion, etc, etc, etc.

    Think about it. You'd be able to do most of your code work via a cross-compiler using Linux or Windows CE.

    As far as the voice recognition goes there are tables of vowel sounds that you can find on the net. Then, you'd just have to break out your old Numerical Analysis book and figure out the FFT for the comparing your data to the table. Sounds easy enough. . . but 6 years later and I still cannot have my computer talk with me the correct way. . .

    Then there is that whole MS thing where their sound rec. stuff went really wrong. . .

  8. #8
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    A speech recongizer is more than just applying an FFT and looking in a table. The entire signal processing part is just the back-end, which is usually pretty inaccurate at detecting the correct phones. After you get a stream of phones you have a whole new problem of converting them into words.

    If your "vocabulary" is limited enough you can try to directly match phone sequences to your operations. But you have to have pretty good error tolerance (typically you train an HMM for this, HMMs are often use for extracting phones from the signal too).


    I've written the front end of a speech recognizer (takes phone sequences, outputs words). Your welcome to it if you think it'll help, its written in Python. It needs a large dictionary and is a little intensive on the processing side of things, its probably not the approach your looking for with an embedded system.

  9. #9
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I found a speech recognition IC from Philips NVP semiconductors. I also found a timer IC, a PIC, DMAC, and DSP. Some DSPs have this built in. The more stuff built in the less junk we have to put on the board and the easier for me to code.

    We are still looking into this and no this is not a new idea. Philips has several chips that are automobile ready and can control A/C, Heat, fan speed, door locks, wipers, lights, etc and mixed with their voice recognition chip - you nearly have what I need to complete the task.

    The board stuff is a bit out of my league but I can do the rest. I need as much help from you guys as possible to pull this one off so keep the replies coming. And the operating system for this board will be held on a separate ROM chip and coded by yours truly. Since there isn't any disk access and the interrupt table is quite small, a small OS just to get it up and running should not be too daunting of a task.
    Last edited by VirtualAce; 10-11-2006 at 11:01 PM.

  10. #10
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    You should definately use a laptop or a mini-itx PC instead. It would be so much easier.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading and writing to an embedded file
    By HLMetroid in forum C# Programming
    Replies: 4
    Last Post: 01-02-2009, 12:03 AM
  2. Embedded system board
    By ssharish2005 in forum Tech Board
    Replies: 1
    Last Post: 08-12-2007, 03:03 PM
  3. Question on embedded systems
    By ssharish2005 in forum C Programming
    Replies: 3
    Last Post: 08-12-2007, 02:28 PM
  4. embedded c++
    By fizz_uk83 in forum C++ Programming
    Replies: 4
    Last Post: 08-13-2003, 08:09 AM
  5. Embedded C
    By Sheep in forum C Programming
    Replies: 3
    Last Post: 03-27-2002, 06:37 PM