Shop OBEX P1 Docs P2 Docs Learn Events
RE: Doubt with interfacing LED with an 32-bit micro through a D-latch — Parallax Forums

RE: Doubt with interfacing LED with an 32-bit micro through a D-latch

sknskn Posts: 2
edited 2007-05-05 04:46 in Robotics
hi

I'm working on TMS320F2812, a 32-bit DSP. I need to interface an a 8X1 LED with my Processor through the GPIO's of the processor. The GPIO's are connected to the LED's through a 74HC273 D-Latch.

Can anyone give me pointers on how I must go about the same ?? I have a couple of doubts :

1. My GPIO pins are wired to the D0 to D7 pins of the D-latch. The Outputs Q0 to Q7 are wired to the 8X1 LED Board.

My confusion is :

how do i ensure connectivity of the GPIO's with pins (D0 - D7) of the latch through Software ( C- routine ) ???
i.e, Do i need to define a structure with the address of D0 - D7 so that I actually realise the connection between them through
software ??
Will appreciate if anyone can give me any pointers on how to go about the same. Any sample codes will be of immense help tooo.

thanks

skn

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2007-05-04 15:05
    Wow, a TMS320. On the one hand, the BS2 is a 16-bit PIC chip, with a PBasic interpreter built in, that cycles at 2,000 Basic Instructtions Per second. So you're horsepower is huge compared to ours.

    On the other hand, a program to send data to your latch using the BS2 is like:

    MAIN:
    OUTL = $FF
    PULSOUT LatchToggle, 10 ' 10 mSec pulse
    PAUSE 1000
    GOTO MAIN

    So, I'm assuming you have some C routine that lets you write to your GPIO I/O pins, right? This should be pre-defined in the run-time library of the TMS320 "C" compiler. Read the manual. Perhaps its a memory mapped port, but they should STILL have an example.

    Having written the value, you now need to 'strobe' the clock line of the 273, so the inputs are 'strobed' to the outputs.

    If this brief guidance doesn't help you, there's not much more on the Parallax site for something as involved as the TMS320. Or even 'C', for that matter.
  • sknskn Posts: 2
    edited 2007-05-05 04:46
    hi

    i kinda figured that out now..

    thanks for your assistance..

    skn
Sign In or Register to comment.