Find the answer to your Linux question:
Results 1 to 5 of 5
If I want to experiment with programming for devices, i.e.: write a program to display info on an lcd such as mp3 id3 tags, what languages will work? Can I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie ThoughtVelocity's Avatar
    Join Date
    May 2005
    Location
    OH
    Posts
    160

    Device programming - What language?


    If I want to experiment with programming for devices, i.e.: write a program to display info on an lcd such as mp3 id3 tags, what languages will work? Can I use python or do I have to use C? Will any language work? I assume no, but I am a little unclear on what is best suited and why? I want to hook an lcd to a usb port or serial port and have the info show up on the mini lcd.
    "If you are out to describe the truth leave elegance to the tailor."
    -Einstein

  2. #2
    Just Joined!
    Join Date
    Mar 2006
    Posts
    29
    There is no specific language for developping programs for devices.
    The problem here is the driver for the device, you must write a device driver for the device, just see the documentation in the internet how to do that ! After that, all you have to do is communicate through the API you have designed for the device. For example :
    The device driver is loaded when the device is probed, it checks if it is the right device, creates a special caracter file in /dev (Ex : /dev/lcdscreen), everything put in this file is sent automatiquelly to the device. (this is just an example). The device driver can be written with any compiled language (C, C++, Pascal ...), you can't use Python, bash or any other scripting language ! Forr the user space program, you can use anything you want !!
    Hope that helps
    PS : Excuse my bad english !

  3. #3
    Just Joined!
    Join Date
    Mar 2006
    Posts
    34
    Here's an online book that will help you write device drivers for Linux:
    http://www.xml.com/ldd/chapter/book/

  4. #4
    Linux Newbie ThoughtVelocity's Avatar
    Join Date
    May 2005
    Location
    OH
    Posts
    160
    Cool, thanks for the link. This is a good start.
    "If you are out to describe the truth leave elegance to the tailor."
    -Einstein

  5. #5
    Just Joined!
    Join Date
    Mar 2006
    Posts
    13
    I see a lot of people doing projects in which they have MP3 info displayed to an LCD. If you're electronics savy, the FT232BM IC (there are adapter boards for it which do the "heavy" electronics work for you) allows you to use your USB as a serial port. If you have a serial port, you can access it via code quite easily in C. You can then use a cheap microcontroller to interface with between your PC and your LCD. For example, you could write "hello" to the serial port, which the microcontroller (which you program firmware) will then display that "hello" on the LCD.

    The cool thing, is Atmel microcontrollers can be programmed in C and compiled with GCC just like other C programs. So you could write the firmware and the "driver" or an interfacing application in C too.

    I have an example LCD project which uses gcc with an Atmel microcontroller here: http://www.micahcarrick.com/v2/content/view/27/21/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •