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

Truncated match.
PICList Thread
'16C73A Musingsa'
1997\02\07@164128 by myke predko

flavicon
face
Hi Gang,

A few things regarding a project for the 16C73A:

1.  Does anybody know where you can buy some JW Parts?  Digi-Key and the
other suppliers I talked to said they're back ordered until April.

2.  What is the actual speed the parts run at?  I've been trying a 20 MHz
ECS Ceramic Resonator and it doesn't run (a 10 MHz part run fines).  The
catalog says that the internal caps are 30 pF.  The datasheet says that a 16
MHz Resonator with 10-22 pF caps ran fine.  Do I have too much built-In
Capacitance?
I did try a series 47 & 100 Ohm resistor with no luck.

3.  This is in the annals of "I shoulda known better", but just a heads up
for people.  Typically, I put any tables that I am going to use immediately
following the Interrupt Jump Statement (to get the maximum table size).  As
I just started running with the 16C73A (which has 4K of Program Memory), I
didn't think about the ramifications when an Interrupt occurs when the
execution is happening in the high 2K of memory - normally I put the tables
in the first 256 instructions and just ignore PCLATH.

You can't do that with this part, so now I put all the context saving (which
sets PCLATH to 0) starting at Address 4 and then jump to the rest of the
interrupt Handler (over the tables).

myke

"I don't do anything that anybody else in good physical condition and
unlimited funds couldn't do" - Bruce Wayne

1997\02\07@192138 by Bob Blick

flavicon
face
At 04:37 PM 2/7/97 EST, you wrote:

>2.  What is the actual speed the parts run at?  I've been trying a 20 MHz
>ECS Ceramic Resonator and it doesn't run (a 10 MHz part run fines).  The
>catalog says that the internal caps are 30 pF.  The datasheet says that a 16
>MHz Resonator with 10-22 pF caps ran fine.  Do I have too much built-In
>Capacitance?
>I did try a series 47 & 100 Ohm resistor with no luck.

Hi Myke,

There may be something funny about the ceramic resonators from Digi-Key, or
maybe just all high frequency resonators. I spent a little time on the same
thing and found that a 16mhz resonator would work but no luck with a 20mhz
resonator. It may be that resonators are more lossy than crystals and the
PIC does not have enough gain. 20mhz crystals work fine.

-Bob

1997\02\07@204316 by Dwayne Reid

flavicon
face
Hi Myke,

>1.  Does anybody know where you can buy some JW Parts?  Digi-Key and the
>other suppliers I talked to said they're back ordered until April.

I talked with my local FAI lady and she confirmed that parts are not
available until the end of March  (she has 500+ /JW 73A parts on backorder).
I would talk to the Microchip rep for your area and see if you can scare up
a couple of samples.

>2.  What is the actual speed the parts run at?  I've been trying a 20 MHz
>ECS Ceramic Resonator and it doesn't run (a 10 MHz part run fines).  The
>catalog says that the internal caps are 30 pF.  The datasheet says that a 16
>MHz Resonator with 10-22 pF caps ran fine.  Do I have too much built-In
>Capacitance?

I can't help you there.  I run my parts with AVX 4 MHz. resonators with no
problems whatsoever.  I have yet to try higher frequencies.

{Quote hidden}

I posted some code to the list in early November that seems to work OK.  I
have modified it slightly in subsequent revisions of the project.  I'll
include it here again.

PS I am still looking for possible problems with the table lookup macros.
I'm worried about them expanding to different numbers of instructions and
messing up the assembler during the multiple passes the assembler takes to
assemble the code (phasing errors).  I haven't seen any problems so far but
macro errors can be subtle and I don't want to get caught.

The following is rather long, sorry.  Comments and critisms appreciated.
Dwayne

;PAGE MACROS

tablecall       MACRO   table
;allows total table space of about 500 bytes.  All tables must be on
;page 0 located right after the interrup vector.
;enters with name of table and total number of lines in table.
   if ((high (table)) != (PCLATH))     ;table in same segment as caller?
     clrf      PCLATH                  ;
     if (table & 0x100)                ;allow 2 segments for table space
       bsf     PCLATH,1
     endif
   endif
   call        table
;fix up PCLATH after return from table call
   if  ($ & 0x800)                     ;returning to ROM page 1?
     bsf       PCLATH,3
   endif
   endm

tabletest       MACRO   table
;check to make sure table does not cross 256 byte segment boundry.
;place at end of each table with table name as parameter
   if (high $) != (high table)
     error "WARNING: table " table " crosses 256 byte boundary!"
   endif
   endm


tablejump       MACRO   len
;loads PCLATH with segment for table based jumps and ensures that jump
;table does not cross segment boundary.
;enters with number of lines from this call to end of table
   list R=DEC
   if (high $) != (high ($+(len)+2))
     error "WARNING: jump table crosses 256 byte boundary!"
   list R=HEX
   endif
   movlw       (high $)
   movwf       PCLATH
   endm

;other macros not shown


;start of program
   ORG         00H
   goto        COLDSTART

   ORG         04H
;save status and W registers
   movwf       W_SAVE          ;save w (could be on either ram page)
   movfw       STATUS          ;status register now trashed
   clrf        STATUS          ;ensure ram page 0
   movwf       S_SAVE          ;good copy of status register in Page 0
   movfw       PCLATH          ;remember to also save FSR if necessary
   movwf       P_SAVE
   clrf        PCLATH          ;ensure ROM page 0
;decode interrupt   NOTE: all int routines located after lookup tables;
;Parsing done here to reduce jumps (and time)

   btfsc       INTF
     goto      INT_ISR
   btfsc       ADIF
     goto      AD_ISR
   btfsc       T0IF
     goto      T0_ISR
   btfsc       ????
     goto      ??_ISR
;etc
   goto        BAD_INT         ;bad interrupt - reset flags and exit

;jump tables live here

SevenSeg        ;enters with hex # in w, returns with 7 seg data
;TES displays     abcdefg.     (data sent MSB first)
   andlw       B'00001111'     ;truncate jump table to 4 bits
   addwf       PC,F
   retlw       b'11111100'     ; 0        segment layout
   retlw       b'01100000'     ; 1             aaaa
   retlw       b'11011010'     ; 2            f    b
   retlw       b'11110010'     ; 3            f    b
   retlw       b'01100110'     ; 4            f    b
   retlw       b'10110110'     ; 5             gggg
   retlw       b'10111110'     ; 6            e    c
   retlw       b'11100000'     ; 7            e    c
   retlw       b'11111110'     ; 8            e    c
   retlw       b'11110110'     ; 9             dddd
   retlw       b'11101110'     ; A
   retlw       b'00111110'     ; B
   retlw       b'00111010'     ; C
   retlw       b'01111010'     ; D
   retlw       b'10011110'     ; E
   retlw       b'10001110'     ; F
   TABLETEST   SevenSeg        ;ensure table does not cross segment boundary


;other jump tables as required

;Interrupt service routines live here

AD_INT
   bcf         ADIF
   blah blah blah
   goto        INT_END
;other int routines

INT_END
   blah blah blah
   restore saved variables (PCLATH, STATUS, W)
   RETFIE


;END OF INTERRUPT ROUTINES: MAIN CODE STARTS HERE

COLDSTART
   clrf        PCLATH          ;ensure ROM 0 page if software reboot
;rest of startup routine


;example of tablecall macro usage

   movfw       SOMETING        ;get table index into w
   tablecall   HTRMASK         ;tablecall looks after PCLATH
   movwf       LEDS            ;put result from table into destination

;example of tablejump  Note that macro trashes w and must be called before
;jump index is put into w

   tablejump   .19             ;enters with # lines to end of table
   swapf       INADR,W         ;get IPC command into lower nybble
   andlw       b'00001111'     ;ignore # bytes in packet
   addwf       PCL,F           ;jump to appropriate routine
   goto        IpcCmdFin       ;not used
   goto        IpcRdMux        ;read mux inputs starting from address
   goto        IpcWdbI         ;write indexed
   goto        IpcRdbI         ;read indexed
   goto        IpcWram         ;write CPU ram
   goto        IpcRram         ;read CPU ram
   goto        IpcWdbL         ;write eeprom Pg0
   goto        IpcRdbL         ;read eeprom Pg0
   goto        IpcWdbH         ;write eeprom Pg1
   goto        IpcRdbH         ;read eeprom Pg1
   goto        IpcCmdFin       ;not used (future commands)
   goto        IpcCmdFin       ;not used (future commands)
   goto        IpcCmdFin       ;not used (future commands)
   goto        IpcCmdFin       ;not used (future commands)
   goto        IpcCmdFin       ;not used (future commands)
   goto        IpcCmdFin       ;not used (future commands)


Dwayne Reid   <spam_OUTdwaynerTakeThisOuTspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, Alberta, CANADA
(403) 489-3199 voice     (403) 487-3197 fax

1997\02\08@015057 by Shel Michaels

picon face
Myke Predko writes:

<< I've been trying a 20 MHz ECS Ceramic Resonator and it doesn't run >>

Myke - I had _exactly_ the same experience - using 20MHz ECS resonators from
Digikey, on a 16C74JW.  Tried several different '74s, and series R.  Tried XT
and HS configs.  Nothing worked.  Xtal works fine, of course.


Shel Michaels
Massachusetts, USA

1997\02\08@100735 by mike

flavicon
picon face
In message  <.....m0vsxz7-001BqqCKILLspamspam@spam@passport.ca> PICLISTspamKILLspamMITVMA.MIT.EDU writes:
[snips]
> 2.  What is the actual speed the parts run at?  I've been trying a 20 MHz
> ECS Ceramic Resonator and it doesn't run (a 10 MHz part run fines).  The
> catalog says that the internal caps are 30 pF.  The datasheet says that a 16
> MHz Resonator with 10-22 pF caps ran fine.  Do I have too much built-In
> Capacitance?
> I did try a series 47 & 100 Ohm resistor with no luck.

Myke,

FWIW, I am using a C73 (not A) with a 20MHz ceramic resonator with
built in caps with no problems.

Regards,


Mike Watson

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