DSPRelated.com
Forums

DB_STAT0 documentation?

Started by paulmauricedsp August 7, 2007
Hello everybody,

I am using DSK C6711, and want to input digital signal.

1. I have read things from the newsgroups, and saw it is possible to
use DB_STAT0 and DB_STAT1 (easier than McBSP as GPIO).
However, I can't find any doc from TI about those DB_STAT!
I know they are bits from IO_PORT = 0x9008000, but which?
In which doc can I find those information?
(I know 27 is DB_CNTL0 and 28 is DB_CNTL1, but DB_STAT?)

2. Configuring McBSP as GPIO:
in SPRA633, TI explains how to configure McBSP as GPIO for UART
communication.
In their code example, they use MCBSP_IO_ENABLE, MCBSP_DRSTAT macros.
Where to find those? They are not documented...

Regards
Paul Maurice
Paul,

--- paulmauricedsp wrote:

> Hello everybody,
>
> I am using DSK C6711, and want to input digital
> signal.
>
> 1. I have read things from the newsgroups, and saw
> it is possible to
> use DB_STAT0 and DB_STAT1 (easier than McBSP as
> GPIO).
> However, I can't find any doc from TI about those
> DB_STAT!
> I know they are bits from IO_PORT = 0x9008000, but
> which?
> In which doc can I find those information?

The info is in the 6711DSK help file, but it is not
plainly identified. It seems like I used the
schematics, PAL equations, and GEL file to decode it.
DB_CNTL0/1 are two generic output bits and DB_STAT0/1
are two generic input bits - they are very easy to
use. Refer to the 6711DSK GEL file that reads the
switches and lights the LEDs - they are different bits
at the same address.

> (I know 27 is DB_CNTL0 and 28 is DB_CNTL1, but
> DB_STAT?)
If you write bits 27 & 28, they go to DB_CNTL.
If you readbits 27 & 28, they they come from DB_STAT.

>
> 2. Configuring McBSP as GPIO:
> in SPRA633, TI explains how to configure McBSP as
> GPIO for UART
> communication.
> In their code example, they use MCBSP_IO_ENABLE,
> MCBSP_DRSTAT macros.
> Where to find those? They are not documented...

You can probably find the reference document at ti.com
- try searching 'MCBSP_IO_ENABLE'.

mikedunn
>
> Regards
> Paul Maurice
Paul,

--- paulmauricedsp wrote:

> Hello Mike,
>
> Thanks for your answer,
>
> --- In c..., Mike Dunn
> wrote:
> >
> > Paul,
> >
> > --- paulmauricedsp wrote:
> >
> > > Hello everybody,
> > >
> > > I am using DSK C6711, and want to input digital
> > > signal.
> > >
> > > 1. I have read things from the newsgroups, and
> saw
> > > it is possible to
> > > use DB_STAT0 and DB_STAT1 (easier than McBSP as
> > > GPIO).
> > > However, I can't find any doc from TI about
> those
> > > DB_STAT!
> > > I know they are bits from IO_PORT = 0x9008000,
> but
> > > which?
> > > In which doc can I find those information?
> >
> > The info is in the 6711DSK help file, but it is
> not
> > plainly identified. It seems like I used the
> > schematics, PAL equations, and GEL file to decode
> it.
> > DB_CNTL0/1 are two generic output bits and
> DB_STAT0/1
> > are two generic input bits - they are very easy to
> > use. Refer to the 6711DSK GEL file that reads the
> > switches and lights the LEDs - they are different
> bits
> > at the same address.
> >
> That's right.
> I have not found any information from TI's docs
> except in the 6711DSK
> help file. However, they do not even mention the
> address of DB_STAT!
> That is the reason why I am wondering where you guys
> did know that
> DB_STAT was a bit of 0x9008000.

OK - we will perform a simple engineering tutorial.
1. Go to the schematics. Note on page 1 that sheet 13
contains the daughtercard interface [probably
originally 'daughterboard' since it is designated
'DB'].
2. Locate DB_STAT and DB_CNTL signals. They come from
sheet 10.
3. Goto sheet 10. Note that they are connected to U6
[2 8bit latches]. Observe that the latches are
connected to the upper eight bits of the data bus
[EA24-31]. U6a is controlled by RD_IOPORT and U6b is
controlled by WR_IOPORT. They come from sheet 5.
4. Goto sheet 5. U18 [PALB] generates the signals.
5. Goto the Help file and locate PALB. In the listing
there are some lines like:

"ReaD the I/O PORT
!RD_IOPORT_ = !CE1_ & EA19 & !ARE_;

"WRite the I/O PORT
WR_IOPORT = !CE1_ & EA19 & !AWE_;

ARE is 'async read enable' and AWE is 'async write
enable'. The other terms represent the address.
['x'dr bits, '-'== not connected
EA19 = ----.----.--xx.1xxx.xxxx.xxxx.xxxx.xx--
CE1 = 1001.----.--xx.xxxx.xxxx.xxxx.xxxx.xx--
The lowest address that 'enables' is 0x9008.0000
[there are many addresses that will work].
Nothing to it.
>
> By the way, 0x9008000 is defined in c6711dsk.h as
> IO_PORT, but IO_PORT
> seems to be not documented...

Many devlopment boards are intended for software
developers and engineers. As such, the documentation
may not be as 'turnkey' as one would like. I have
previous used the 6711DSK and was able to find all
that I needed to know about "every software bit and
hardware component" - I just had to sometimes dig for
it [which included digging up the hard to find specs
on the SMC parallel port chip].
> > > (I know 27 is DB_CNTL0 and 28 is DB_CNTL1, but
> > > DB_STAT?)
> > If you write bits 27 & 28, they go to DB_CNTL.
> > If you readbits 27 & 28, they they come from
> DB_STAT.
> Brilliant, you answered my question!
> Surprisingly, DB_STAT and DB_CNTL share the same
> bits.
> I can now read DB_STAT, that is great. I am sure
> that will help more
> than one person.
> > > 2. Configuring McBSP as GPIO:
> > > in SPRA633, TI explains how to configure McBSP
> as
> > > GPIO for UART
> > > communication.
> > > In their code example, they use MCBSP_IO_ENABLE,
> > > MCBSP_DRSTAT macros.
> > > Where to find those? They are not documented...
> >
> > You can probably find the reference document at
> ti.com
> > - try searching 'MCBSP_IO_ENABLE'.
> The only thing returned by ti.com is SPRA633 doc.
> It seems these macros are not supported anymore...

I know that TI has [or had] a 'howto' app note for
using McBSP pins as GPIO. Try searching 'McBSP GPIO'.

gotta go - lesson is over.

mikedunn
> Paul Maurice
> > mikedunn
> > >
> > > Regards
> > > Paul Maurice
> > >
> > >
>
Hello Mike,

Big thanks for your detailed answer, I am sure it will help more than me.

Please see my comments,
--- In c..., Mike Dunn wrote:
>
> Paul,
>
> --- paulmauricedsp wrote:
>
> > Hello Mike,
> >
> > Thanks for your answer,
> >
> > --- In c..., Mike Dunn
> > wrote:
> > >
> > > Paul,
> > >
> > > --- paulmauricedsp wrote:
> > >
> > > > Hello everybody,
> > > >
> > > > I am using DSK C6711, and want to input digital
> > > > signal.
> > > >
> > > > 1. I have read things from the newsgroups, and
> > saw
> > > > it is possible to
> > > > use DB_STAT0 and DB_STAT1 (easier than McBSP as
> > > > GPIO).
> > > > However, I can't find any doc from TI about
> > those
> > > > DB_STAT!
> > > > I know they are bits from IO_PORT = 0x9008000,
> > but
> > > > which?
> > > > In which doc can I find those information?
> > >
> > > The info is in the 6711DSK help file, but it is
> > not
> > > plainly identified. It seems like I used the
> > > schematics, PAL equations, and GEL file to decode
> > it.
> > > DB_CNTL0/1 are two generic output bits and
> > DB_STAT0/1
> > > are two generic input bits - they are very easy to
> > > use. Refer to the 6711DSK GEL file that reads the
> > > switches and lights the LEDs - they are different
> > bits
> > > at the same address.
> > >
> >
> >
> > That's right.
> > I have not found any information from TI's docs
> > except in the 6711DSK
> > help file. However, they do not even mention the
> > address of DB_STAT!
> > That is the reason why I am wondering where you guys
> > did know that
> > DB_STAT was a bit of 0x9008000.
>
> OK - we will perform a simple engineering tutorial.
> 1. Go to the schematics. Note on page 1 that sheet 13
> contains the daughtercard interface [probably
> originally 'daughterboard' since it is designated
> 'DB'].
> 2. Locate DB_STAT and DB_CNTL signals. They come from
> sheet 10.
> 3. Goto sheet 10. Note that they are connected to U6
> [2 8bit latches]. Observe that the latches are
> connected to the upper eight bits of the data bus
> [EA24-31]. U6a is controlled by RD_IOPORT and U6b is
> controlled by WR_IOPORT. They come from sheet 5.
> 4. Goto sheet 5. U18 [PALB] generates the signals.
> 5. Goto the Help file and locate PALB. In the listing
> there are some lines like:
>
> "ReaD the I/O PORT
> !RD_IOPORT_ = !CE1_ & EA19 & !ARE_;
>
> "WRite the I/O PORT
> WR_IOPORT = !CE1_ & EA19 & !AWE_;
>
> ARE is 'async read enable' and AWE is 'async write
> enable'. The other terms represent the address.
> ['x'dr bits, '-'== not connected
> EA19 = ----.----.--xx.1xxx.xxxx.xxxx.xxxx.xx--
> CE1 = 1001.----.--xx.xxxx.xxxx.xxxx.xxxx.xx--
> The lowest address that 'enables' is 0x9008.0000
> [there are many addresses that will work].
> Nothing to it.
Ok for the explanation.
Just a note on point 3: on my schematics, latches are connected to the
upper eight bits of the data bus [ED24-31], instead of [EA24-31].

Anyway, I now understand the whole system, and the reasons of DB_CNTL0
being bit 27 on 0x9008000.
Once again, many thanks, you gave a strong hand to an inquiring student.

Regards,
Paul Maurice

>
> >
> > By the way, 0x9008000 is defined in c6711dsk.h as
> > IO_PORT, but IO_PORT
> > seems to be not documented...
>
> Many devlopment boards are intended for software
> developers and engineers. As such, the documentation
> may not be as 'turnkey' as one would like. I have
> previous used the 6711DSK and was able to find all
> that I needed to know about "every software bit and
> hardware component" - I just had to sometimes dig for
> it [which included digging up the hard to find specs
> on the SMC parallel port chip].
> >
> >
> > > > (I know 27 is DB_CNTL0 and 28 is DB_CNTL1, but
> > > > DB_STAT?)
> > > If you write bits 27 & 28, they go to DB_CNTL.
> > > If you readbits 27 & 28, they they come from
> > DB_STAT.
> >
> >
> > Brilliant, you answered my question!
> > Surprisingly, DB_STAT and DB_CNTL share the same
> > bits.
> > I can now read DB_STAT, that is great. I am sure
> > that will help more
> > than one person.
> >
> >
> > > > 2. Configuring McBSP as GPIO:
> > > > in SPRA633, TI explains how to configure McBSP
> > as
> > > > GPIO for UART
> > > > communication.
> > > > In their code example, they use MCBSP_IO_ENABLE,
> > > > MCBSP_DRSTAT macros.
> > > > Where to find those? They are not documented...
> > >
> > > You can probably find the reference document at
> > ti.com
> > > - try searching 'MCBSP_IO_ENABLE'.
> >
> >
> > The only thing returned by ti.com is SPRA633 doc.
> > It seems these macros are not supported anymore...
>
> I know that TI has [or had] a 'howto' app note for
> using McBSP pins as GPIO. Try searching 'McBSP GPIO'.
>
> gotta go - lesson is over.
>
> mikedunn
> >
> >
> > Paul Maurice
> >
> >
> > > mikedunn
> > > >
> > > > Regards
> > > > Paul Maurice
> > > >
> > > >
> > >
> >
> >
>