'2 16c74A questions'
I am using a 74A for some async TX/RX and would like
to know what the best way of configuring BRGH is?
Either high speed or low speed as I understand that
there is a bug in one of the settings.
I also wrote some code and ran it in the MPLAB
ver 3.22.02. The code is for the 74A is as follows:
Non of these instructions seem to set the bits,
or that's what the simulator indicates. The only
bit which sets is Port A bit 4. Is it something to
do with their alternate functions?
Thanks in advance
|Gavin Jackson <MITVMA.MIT.EDU> wrote: PICLIST
> I am using a 74A for some async TX/RX and would like to know what
> the best way of configuring BRGH is? Either high speed or low speed
> as I understand that there is a bug in one of the settings.
The bug is with BRGH = 1 (high speed); if you can get away with
it in your application, set BRGH to 0 (low speed).
Yes. RA0-3, RA5, and RE0-2 default to ANALOG INPUTS on power-up
(see Section 13 and Figure 13-2 in the 16C74 Data Book). You
can make the pins outputs by writing to the TRIS registers (as
you've done in your program), but when your program (or the
simulator) reads from those pins, they'll always read low
because the input side of each pin is still connected to the A/D
Note that the pins actually ARE going high; the simulator just
can't tell that they are, because it always sees "0" when it
looks at an output pin that's still configured as an analog
To make the pins digital outputs AND digital inputs, so the
simulator will accurately show the state of the output pins,
write "xxxxx11x" to ADCON1 (register 0x9F). The following
modification to your code will do it:
MOVLW 00000110B ;New line.
MOVWF ADCON1 ;New line.
Also, note that RA4 is an open-collector output... If you really
want it to go high in your circuit, you'll need to ad a pullup
resistor to it.
=== Meet other PICLIST members at the Embedded Systems Conference:
=== 6:30 pm on Wednesday, 1 October, at Bytecraft Limited's booth.
=== For more information on the Embedded Systems Conference,
=== see: http://www.embedsyscon.com/
=== Andrew Warren - ix.netcom.comfastfwd
=== Fast Forward Engineering - Vista, California
On Thu, 25 Sep 1997, Gavin Jackson wrote:
As far as I recall, Pin 4 on Port A is a voltage reference output for the
A/D circuitry. I don't think you can set it. Someone else can clarify as
i don't have my data book here.
> Thanks in advance
More... (looser matching)
- Last day of these posts
- In 1997
, 1998 only
- New search...