Searching \ for '2 16c74A questions' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=16C
Search entire site for: '2 16c74A questions'.

Truncated match.
PICList Thread
'2 16c74A questions'
1997\09\25@020602 by Gavin Jackson

flavicon
face
Hi there

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:

ORG     00H
BSF     STATUS,RP0
CLRF    TRISA
CLRF    TRISE
BCF     STATUS,RP0
BSF     PORTA,0
BSF     PORTA,1
BSF     PORTA,4
BSF     PORTE,0
       END

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
spam_OUTvulcanTakeThisOuTspamihug.co.nz

1997\09\25@030713 by Andrew Warren

face
flavicon
face
Gavin Jackson <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU> wrote:

> 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.

   Gavin:

   The bug is with BRGH = 1 (high speed); if you can get away with
   it in your application, set BRGH to 0 (low speed).

{Quote hidden}

   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
   circuitry.

   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
   input.

   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:

       ORG     00H
       BSF     STATUS,RP0
       CLRF    TRISA
       CLRF    TRISE
       MOVLW   00000110B       ;New line.
       MOVWF   ADCON1          ;New line.
       BCF     STATUS,RP0
       BSF     PORTA,0
       BSF     PORTA,1
       BSF     PORTA,4
       BSF     PORTE,0
       END

   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.

   -Andy

=== 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 - fastfwdspamKILLspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

1997\09\25@115627 by Rob

flavicon
face
On Thu, 25 Sep 1997, Gavin Jackson wrote:

{Quote hidden}

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.

Rob

>
> Thanks in advance
>
> Gavin
> .....vulcanKILLspamspam.....ihug.co.nz
>

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...