Shop OBEX P1 Docs P2 Docs Learn Events
Drivers? — Parallax Forums

Drivers?

Miles. kMiles. k Posts: 34
edited 2010-02-26 15:46 in Propeller 1
I'm 99% new to the propeller and i was wondering...What is a Driver and how do i use it?

Thanks,
Miles

Comments

  • kwinnkwinn Posts: 8,697
    edited 2010-02-26 01:18
    Lots of different kinds of drivers available and basically they take an input signal (usually low voltage/low current) and output a signal (usually higher voltage/current) capable of driving whatever it is connected to. The driven device could be for communications (line drivers), sensors (ultrasonic, IR, light, magnetic, RF, etc), mechanical devices (motors, solenoids, etc) or electrical (lights, heaters, etc).
  • Miles. kMiles. k Posts: 34
    edited 2010-02-26 01:26
    well like when i'm in the propeller tool and i click on "Tv.spin" and run it on my demo board with it connected properly to my tv nothing happens.

    Thanks,
    Miles
  • localrogerlocalroger Posts: 3,452
    edited 2010-02-26 01:39
    Miles, you can't just run a driver; you must run a demo app that uses it. The demos provide example code that shows how to start the driver and use its methods. In the proptool, in the dropdown above the current directory view, select "propeller library - demos" instead of just "propeller library." Then pick something like tv_text_demo.spin and click on that. You might have to rejigger the pins but most of the parallax written demos will run as is on a demoboard (like duh). Then you can look at the code and see how the demo includes the tv_text object, starts it up, sets the pins up, and how you call it to display text.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-02-26 03:03
    Another way to think of what's called a driver is that of a pre-written piece of code that takes care of the details of managing a particular I/O device or class of devices. TV.spin for example manages the details of generating a TV signal that displays a buffer of "tiles" which are 16 x 16 pixel or 16 x 32 pixel areas of the TV screen. These tiles can be used for characters or graphics.
  • Miles. kMiles. k Posts: 34
    edited 2010-02-26 15:46
    Thanks a lot Localroger and mike green!
Sign In or Register to comment.