Searching \ for 'PIC16c74' 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: 'PIC16c74'.

Truncated match.
PICList Thread
'PIC16C74'
1994\12\18@231949 by crocontroller discussion list

flavicon
face
The PIC16C74 datasheet appears on page 2-399 if the 1994 Microchip Data Book.

The device is now sampling and orders are being taken for delivery in Q1.

Highlights from that datasheet include:

4096 x 14 EPROM
192 x 8 RAM
DC-20 Mhz
8 Channel 8 bit A/D


/Len


'PIC16c74'
1999\05\04@114851 by Aidi Moubhij
flavicon
face
Hi,

I'm using the code below to receive a byte from the US ART. When I get the
byte I display it on the LED's and echo it back.
This code is not working for me.  Can anybody tell me what I'm doing wrong.
Thanks


list p=16c74
       Title "first aidi Program"

       include <P16C74.INC>

       org     00h

Start
   clrf    PORTB           ;Clear PORT_B output latches

       bsf     STATUS,RP0      ;Go to Bank1

       clrf    TRISB           ;Config PORT_B as all outputs


       movlw   19h             ;Set Band rate (9600 baud @4MHz)
       movwf   SPBRG
       movlw   b'00100100'     ;8-bit transmit, transmitter enable
       movwf   TXSTA           ;Asynchronous mode, High baud rate

       bcf     STATUS,RP0      ;Go to Bank0

       movlw   b'10010000'     ;8-bit receive, receiver enabled
       movwf   RCSTA           ;serial port enabled

       movf    RCREG,W         ;Get input data
       movwf   PORTB           ;Display on LEDs
       movwf   TXREG           ;Echo character back
       goto    Start

       end




Aidi Moubhij

spam_OUTaidiTakeThisOuTspammjr.com

1999\05\04@130842 by Ray Gardiner

flavicon
face
Hi Aidi,
Just a couple of things, you should set CREN before clearing SREN,
I also found that toggling CREN after receive to clear any rx errors.
See code below. You also must wait for the byte to actually be received.


{Quote hidden}

; ADDED THE FOLLOWING LINES *****;
                                ;
RxTest                           ;
                                ;
        BSF     RCSTA,4         ;set CREN
        BCF     RCSTA,5         ;clear SREN
                                ;
RxWait                           ;
        BTFSS   PIR1,5          ;RxBuffer Full when PIR,5=1
        GOTO    RxWait          ;
                                ;
        BCF     RCSTA,4         ;toggle CREN to clear any Rx
        BSF     RCSTA,4         ;errors. You could choose to
                                ;handle Rx errors differently
                                ;for a "real" application.
; *******************************;

{Quote hidden}

Hope that helps.



Ray Gardiner rayspamKILLspamhdc.com.au

1999\05\04@142541 by Aidi Moubhij

flavicon
face
Hi Ray,
Thank you very much for your help.  What you suggested fixed the problem.
Now I can move on to the next step.  Thank you again.



At 01:08 PM 5/4/99 -0400, you wrote:
{Quote hidden}

Aidi Moubhij

aidispamspam_OUTmjr.com

1999\05\04@193905 by Peter van Hoof

flavicon
face
i'm not really familiar with the 16c74 but many people here shy away from
longer code segments so i give it a try
what seemed obvious in simulation is that the led's display and inmediately
get cleared (if the receiver gets set up correctly , i did not check),  you
are looping to start which clears port b (within microseconds ) you never
see them blink

make the last part of your program
loop    movf RCREG,W         ;Get input data
   movwf   PORTB           ;Display on LEDs
   movwf   TXREG           ;Echo character back
   goto    loop

   end


{Original Message removed}

1999\05\05@081403 by Tom Handley

picon face
  Aidi, SREN is not relevant in the Asynchronous mode so there is no need
to clear it. What probably fixed your problem is the clearing and setting of
the CREN bit which clears the Overrun Error bit, OERR. A better way to
handle this is to monitor OERR and FERR (Framing Error). If OERR is set,
clear the error by clearing and setting the CREN bit. If FERR is set, clear
the error by reading another Byte from the RCREG. While I normally use
Parallax/CVASM syntax I can provide a MPASM example if someone else does'nt
jump in.

  This leads to a more serious problem. The 16C74 and 16C74A have a known,
documented, bug when using the high-speed mode (BRGH=1). You simply can not
get reliable operation with these devices (and the 16C73/73A) when BRGH=1.
The simple and low cost solution is to use another crystal. With an 8MHz
crystal you can get 9600 +/- 0.16% with BRGH=0 and SPBRG=12. You can also
switch to a 16C74B or a 16C77 which work fine with BRGH=1. They are both
pin-compatible with the 16C77 having 8K of program memory and 368 Bytes of
data memory compared with 4K/192 Bytes for the 16C74x. Another nice thing
about the 16C77 is that the upper 16 Bytes of data memory are mapped into
all four banks.

  - Tom

At 02:24 PM 5/4/99 -0400, Aidi Moubhij wrote:
{Quote hidden}

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