Searching \ for '[PIC]:' 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=pic
Search entire site for: ':'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:'
2000\06\09@091503 by Jilles Oldenbeuving

flavicon
face
Hi Piclisters,

I'd like to know if someone on this list has ever done something with
serielizeing their productions. I have to give a PIC16F83 a
serialnumber/unique adress
at program time. Does anybody know how i can do this?



Regards,

Jilles Oldenbeuving
spam_OUTjillesTakeThisOuTspamrendo.dekooi.nl


'[PIC]:'
2000\07\05@175433 by Robert Boardman
flavicon
picon face
Help with tmr1 and icd debugger
Trying to monitor tmr1 interrupt using the icd, it appears that the
debugger doesn't support interrupts regarding tmr1 overflow (int-clock). If
i use mpsim the interrupt occurs.

Their is a short programme below which doesn't work with the icd, while
single stepping but works under mpsim.
Could anyone tell me what the problem is or does icd not support tmr
interrupts!
Also has anyone done asm routines for the lcd hardware within the pic16c92x
I hate writing code then finding it later.

list      p=16f877            ; list directive to define processor
#include <p16f877.inc>        ; processor specific variable definitions


__CONFIG _CP_OFF & _WDT_OFF & _BODEN_ON & _PWRTE_ON & _HS_OSC &
_WRT_ENABLE_ON & _LVP_OFF & _DEBUG_OFF & _CPD_OFF



pclath_temp EQU 0X20
status_temp EQU 0X21
w_temp  EQU 0X22



 ORG     0x000             ; processor reset vector
 NOP
   goto    START

 ;**********************************interrupt
vector*****************************

  ORG     0x004             ; interrupt vector location
 movwf   w_temp            ; save off current W register contents
 movf STATUS,w          ; move status register into W register
 movwf status_temp       ; save off contents of STATUS register
 movf PCLATH,w
 movwf pclath_temp
 bcf status,rp0
 clrf PCLATH

bcf PIR1,TMR1IF

   nop                        ;do something in interrupt
   nop
   nop


 movf pclath_temp,w
 movwf PCLATH
 movf    status_temp,w     ; retrieve copy of STATUS register
 movwf STATUS            ; restore pre-isr STATUS register contents
 swapf   w_temp,f
 swapf   w_temp,w          ; restore pre-isr W register contents
 retfie                    ; return from interrupt


;******************************end of interrupt
vector**************************

;start of main programme******************************

START


    clrf PIR1
    clrf INTCON
    clrf TMR1L
    clrf TMR1H
    bcf PIR1,TMR1IF ;timer1 interrupt flag
    bsf T1CON,TMR1ON   ;timer1 on
    bsf INTCON,PEIE
    bsf STATUS,RP0
    bsf PIE1,TMR1IE ;enable timer1 interrupt
    bcf STATUS,RP0
    bsf INTCON,GIE   ;interrupts on
    nop
    nop
    nop
    nop
    nop
    bsf PIR1,TMR1IF   ;trip interrupt

    nop  ;under the icd the program continues here and doesn't goto
interrupt?
   nop
   nop

END

help!!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements


'[PIC]:'
2000\08\09@121934 by Viktor Strigeus
flavicon
face
Hey!

I am going to make an rs-485<->ethernet converter. I am going to use a
crystal
CS8900 ethernet controller to decode the ethernet signals, and a pic
chip as the main processor that will delete all the packets that don't
need to be transmitted to the other side..
The pic is going to send/recieve the 485 signals with a LTC485 chip.

Which pic chip do you recommend for this? How many Mhz, memory should it
have?

Someone told me I should use an UART chip too, what is this good for??

Regards
wiggo

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu>

2000\08\09@123625 by Andrew Kunz

flavicon
face
Use a 20MHz clock - the same one that drives the CS8900A.

Design around a 17C or 18C part (40-pin or higher version) to make life easy on
yourself, and maximize RAM.

Use another serial port with RS-232 for debugging purposes (easier to hook to
your PC).

Andy










Viktor Strigeus <wiggospamKILLspamDUMLE.NU> on 08/09/2000 12:05:46 PM

Please respond to pic microcontroller discussion list <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>








To:      EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU

cc:      (bcc: Andrew Kunz/TDI_NOTES)



Subject: [PIC]:








Hey!

I am going to make an rs-485<->ethernet converter. I am going to use a
crystal
CS8900 ethernet controller to decode the ethernet signals, and a pic
chip as the main processor that will delete all the packets that don't
need to be transmitted to the other side..
The pic is going to send/recieve the 485 signals with a LTC485 chip.

Which pic chip do you recommend for this? How many Mhz, memory should it
have?

Someone told me I should use an UART chip too, what is this good for??

Regards
wiggo

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestKILLspamspammitvma.mit.edu>

2000\08\09@124435 by Viktor Strigeus

flavicon
face
Do u think I need a UART chip for this? I think the cpu should be fast enought to
handle the ltc485 chip

Andrew Kunz wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestEraseMEspam.....mitvma.mit.edu>

2000\08\09@125859 by Bob Ammerman
picon face
Vikyor,

You will have a UART in any of the higher end PICs. What Andrew is saying is
that you might want another serial port for debugging.

Bob Ammerman
RAm Systems

{Original Message removed}

2000\08\09@130730 by Viktor Strigeus

flavicon
face
Yeah,

But I was thinking on the pic16c63-20Mhz, this one should be enough, It has 22
io pins,
16 to the CS8900chip, 4st to the ltc485 chips (2 chips so I can run full
duplex), and 2 ports to the rs-232 port
for debugging.

Do u think that chip is fast enough to handle the cs8900 and send/recieve the
data on the ltc485 chip with 2,5 MBits?



Bob Ammerman wrote:

> Vikyor,
>
> You will have a UART in any of the higher end PICs. What Andrew is saying is
> that you might want another serial port for debugging.
>
> Bob Ammerman
> RAm Systems
>
> {Original Message removed}

2000\08\09@131138 by Andrew Kunz

flavicon
face
Actually, what I meant was that the high-end PICs have multiple USARTS.  Use one
for RS-485 comm and the other for RS-232 comm.

Andy








Bob Ammerman <EraseMERAMMERMANspamPRODIGY.NET> on 08/09/2000 12:36:33 PM

Please respond to pic microcontroller discussion list <RemoveMEPICLISTEraseMEspamEraseMEMITVMA.MIT.EDU>








To:      RemoveMEPICLISTspam_OUTspamKILLspamMITVMA.MIT.EDU

cc:      (bcc: Andrew Kunz/TDI_NOTES)



Subject: Re: [PIC]:








Vikyor,

You will have a UART in any of the higher end PICs. What Andrew is saying is
that you might want another serial port for debugging.

Bob Ammerman
RAm Systems

{Original Message removed}

2000\08\09@132008 by Andrew Kunz

flavicon
face
2.5Mbps on the serial line is too fast for a 20MHz PIC.  You have 5 MHz
instruction clock, which means (if you are perfectly synchronized to the data)
you essentially have only two instructions to read a bit, stuff it into the
correct buffer byte, etc. while maintaining a buffer pointer, etc.

I thought you were talking about something more reasonable, like 115K bps.

Andy









Viktor Strigeus <RemoveMEwiggoTakeThisOuTspamspamDUMLE.NU> on 08/09/2000 01:02:29 PM

Please respond to pic microcontroller discussion list <EraseMEPICLISTspamspamspamBeGoneMITVMA.MIT.EDU>








To:      RemoveMEPICLISTKILLspamspamMITVMA.MIT.EDU

cc:      (bcc: Andrew Kunz/TDI_NOTES)



Subject: Re: [PIC]:








Yeah,

But I was thinking on the pic16c63-20Mhz, this one should be enough, It has 22
io pins,
16 to the CS8900chip, 4st to the ltc485 chips (2 chips so I can run full
duplex), and 2 ports to the rs-232 port
for debugging.

Do u think that chip is fast enough to handle the cs8900 and send/recieve the
data on the ltc485 chip with 2,5 MBits?



Bob Ammerman wrote:

> Vikyor,
>
> You will have a UART in any of the higher end PICs. What Andrew is saying is
> that you might want another serial port for debugging.
>
> Bob Ammerman
> RAm Systems
>
> {Original Message removed}

2000\08\09@133043 by Bob Ammerman

picon face
Viktor:

If you hope to move data at 2.5 MBits per second you're going to need quite
a bit of horsepower.

Even a PIC18 at 10 MIPS will only give you 32 instructions per byte of data.

Also, you are going to need some buffer space, so the 1.5KB on a PIC18 makes
a lot of sense.

Unless you are making a lot of these, I'd take the fastest/biggest PIC I
could get my hands on.

The idea of running the PIC18 at 20MHz using the same clock as the CS8900
makes a lot of sense.
This would give you 5MIPs or 16 instructions per data byte. This is
reasonable.

I am not familiar with the ltc485 chips. Are these just line drivers, or do
they have some intelligence?

Bob


{Original Message removed}

2000\08\09@133718 by Andrew Kunz

flavicon
face
They are just line drivers.

There are various flavors of 485 drivers.  Use a duplex one from the start (it
uses 4 data lines in the connection, not just 2).

Andy








Bob Ammerman <RAMMERMANSTOPspamspamspam_OUTPRODIGY.NET> on 08/09/2000 01:07:27 PM

Please respond to pic microcontroller discussion list <spamBeGonePICLISTSTOPspamspamEraseMEMITVMA.MIT.EDU>








To:      KILLspamPICLISTspamBeGonespamMITVMA.MIT.EDU

cc:      (bcc: Andrew Kunz/TDI_NOTES)



Subject: Re: [PIC]:








Viktor:

If you hope to move data at 2.5 MBits per second you're going to need quite
a bit of horsepower.

Even a PIC18 at 10 MIPS will only give you 32 instructions per byte of data.

Also, you are going to need some buffer space, so the 1.5KB on a PIC18 makes
a lot of sense.

Unless you are making a lot of these, I'd take the fastest/biggest PIC I
could get my hands on.

The idea of running the PIC18 at 20MHz using the same clock as the CS8900
makes a lot of sense.
This would give you 5MIPs or 16 instructions per data byte. This is
reasonable.

I am not familiar with the ltc485 chips. Are these just line drivers, or do
they have some intelligence?

Bob


{Original Message removed}

2000\08\09@133723 by Viktor Strigeus

flavicon
face
The ltc485 chips doesn't have any intelligence, it just transports the signals

Bob Ammerman wrote:

{Quote hidden}

> {Original Message removed}

2000\08\09@135409 by Bob Ammerman

picon face
Yeh, but you get 16 instructions per byte, which is doable with a UART and
some really tight code.

I'd be more comfortable with an 18C at 10MIPS though.

Bob

{Original Message removed}

2000\08\09@140204 by Andrew Kunz

flavicon
face
>Yeh, but you get 16 instructions per byte, which is doable with a UART and
>some really tight code.

>I'd be more comfortable with an 18C at 10MIPS though.

That was my first recommendation.

Andy

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspamEraseMEmitvma.mit.edu>


'[PIC]:'
2000\09\19@095157 by DANNY ROWELL
flavicon
face
I THINK THAT AWHILE BACK THERE WAS
SOME CODE TO RUN ON A PIC THAT
COULD ID SEEPROM.
CAN ANYONE HELP.

THANKS VERY MUCH

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
"[PIC]:" PIC only "[EE]:" engineering "[OT]:" off topic "[AD]:" ad's



'[PIC]:'
2000\10\24@194845 by illman, Russell
flavicon
face

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
"[PIC]:","[SX]:","[AVR]:" =uP ONLY! "[EE]:","[OT]:" =Other "[BUY]:","[AD]:" =Ads





'[PIC]:'
2000\11\06@161757 by Dan Dickey
flavicon
face
I am looking for any web pages with directions in a Spanish Language format concerning Microchip Pic microcontrollers.  I am in Lima, Peru and I need to find any documentation ASAP for one of my programmers,

Thanks and Regards.

Dan Dickey
@spam@ddickey@spam@spamspam_OUTvgtworld.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
use spamBeGonelistservspamKILLspammitvma.mit.edu?bodyT%20PICList%20DIGEST




2000\11\12@133227 by Craig Parham

flavicon
face
Iam using a PIC programger from Andromeda Research Labs. When I compile
my code with MPLAB and use the HEX file to prog. PIC (16F84) everthing
is fine. When I use PICBASIC and compile my code , the HEX file will not
program the PIC. Both tell me that they use Int. HEX format.....Any
Help   Craig
http://www.arlabs.com

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestspam_OUTspammitvma.mit.edu




2000\11\15@233959 by Alex Thomas

flavicon
face
Hello all,

I have been writing some code for a 16F84-04 @4MHz in XT mode. I have set
the processor to wake up from SLEEP on the RB0 interrupt, which it is doing
except it takes ~14ms to do so. I can't work out where this delay is coming
from. The manual mentions the Oscillator-Startup-timer (OST) which is 1024
Tosc (256us @4MHz), but why am I seeing 14ms? Does anyone know what I am
doing wrong, or is there another timer that I'm not aware of?

Any suggestions or sympathies welcome.

Regards,

Alex.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2000\11\21@142435 by Michael Shiloh

flavicon
face
> Take a look at http://www.gnupic.org .
> At the moment the C2C by Pavel Baranov is probably the best choice (AFAIK the
> Linux version is free for non-commercial use).


it is; i use it; it's quite good but not flawless.

michael

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistserv.....spamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2000\11\21@215303 by Petra Weeks

flavicon
picon face
Compiler = MPLAB-C17 Demo + MPLINK
Problem = Function parameters are located in GPR1 at link time, but the
values are placed in GPR0

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservKILLspamspamspammitvma.mit.edu with SET PICList DIGEST in the body


2000\11\30@214908 by yansong gu

flavicon
face
Hi,

I am trying to manipulating variables with a pic16f84, any body has some
hex/binary routine I can copy?

Yansong

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



'[PIC]:'
2000\12\03@124749 by Olin Lathrop
face picon face
> How do I generate a square wave output eg on a pic16c73, I have used the
> compare to calculate an incoming frequency and want to output a frequency
eg
> 2 two times the incoming, at present it is half of the input

There are lots of ways to generate a square wave.  The simplest is probably
to use one of the two PWM outputs this processor has.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, .....olinspamRemoveMEembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2000\12\06@095813 by Teecy

flavicon
face
Anyone got a routine to calculate a CRC16 checksum.  I have tried two already but they seem to only work with their own polynomial value.  I need a routine that I can use different poly's for different communications protocols.


Thanks.
D.T.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body


2000\12\22@124412 by Al Parsons

picon face
Thank you for the heads-up, James.

Hi:

I'm new to this list. Is there  anyone on the list doing  any work with the new 16C745/765 with regard to USB applications?
I just programmed the 745 with the USB support/demo program from the Microchip website, but the device refuses to enumerate. Any help/experience would be appreciated.

OS: Win 98 v.4.10.1998
USB driver:   uhcd.sys       v. 4.10.2000
                   usbhub.sys    v. 4.10.2019
                   usbd.sysv       v. 4.10.2019
My joystick enumerates OK.

The scope indicates the Oscillator is running OK.
The power pin bypass caps are in place.
Power is being supplied from the bus and local.
The bus data pins are staying low.

                       
Thanks,
Al

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-request@spam@spamspam_OUTmitvma.mit.edu



'[PIC]:'
2001\01\05@140016 by Al Parsons
picon face
Can anyone recommend an Evaluation board/module that can handle the pic 16C745/765 chips?

Regards,
Al

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservspamspammitvma.mit.edu with SET PICList DIGEST in the body


2001\01\11@043348 by Andrew Scott

flavicon
face
Hi,

I am using the PIC16F877 and I am using portc for I/O. I have had it reading
from a I/O pin and outputing to another I/O pin. Therefore vss, vdd, clock
etc must be setup right. Pin0-2 are Output, set to 1, pin3-6 are Input. They
connect together through a keypad. The volts on pin0-2 is about 2v while the
volts on pin3-6 is about 4.4v.

Shouldnt the Input pins be 0 volts and the Output pins be 5v?

What causes this???? Have I got a faulty chip??? Or is it just me??

Kind Regards,
Andrew Scott - PIC Newbie

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestEraseMEspammitvma.mit.edu


2001\01\11@044432 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

The inputs are CMOS with no internal pulups/downs on PORTC.  Therefore,
unless you have supplied an external pullup/down, the inputs are floating,
which is a bad thing.

The outputs certainly should be at (or near) 5volts if you have the
corresponding bits in the TRIS register set to 0 and the PORT register set
to 1.  Try disconnecting your keypad, a wiring fault could be pulling the
pins down.  Post your code you have used to initialise the port so the gurus
on the list can take a look.

Regards

Mike

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam@spam@mitvma.mit.edu


2001\01\11@091207 by Drew Vassallo

picon face
>I am using the PIC16F877 and I am using portc for I/O. I have had it
>reading
>from a I/O pin and outputing to another I/O pin. Therefore vss, vdd, clock
>etc must be setup right. Pin0-2 are Output, set to 1, pin3-6 are Input.

I assume that by "set to 1" you mean that you are sending the pin high to
check for your keypad pull-down.  I also assume that your Vdd is 5VDC.

They
>connect together through a keypad. The volts on pin0-2 is about 2v while
>the
>volts on pin3-6 is about 4.4v.

Disconnect the keypad and measure the pin outputs.  If you're outputting a
high pin level, it should be 5V.  Also, you can't externally measure the
voltage level on an input pin - it won't give you anything meaningful (it
actually should read 0, but it's floating).  Any pins that you aren't using
should be set for outputs.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestspam_OUTspam.....mitvma.mit.edu


2001\01\11@095425 by rostaman

flavicon
face
Andrew:

Are the dip switches for the portc 0-2 LEDs in the off position?
I had this problem before when using 3 & 4 for i2c slave
pins.

Ross




----         Andrew Scott <spamBeGonescottyEraseMEspamGLOBALSOFT.COM.AU> wrote:
{Quote hidden}

__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-request@spam@spamspamBeGonemitvma.mit.edu



'[PIC]:'
2001\02\08@144403 by LINDA
flavicon
picon face
part 1 4035 bytes content-type:multipart/alternative; (decoded quoted-printable)


------ 2001\02\08@145834 by Bob Blick
face
flavicon
face
> Hi! One of your friends has just registered with Mailround.
>         Our mission is to enhance the email experience by adding fun

Hi LINDA,

You'll get a better response if you don't use an email service that spies
on the recipient.

Cheerful regards,

-Bob

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\08@162214 by jamesnewton

face picon face
This member has been un-subscribbled by me. Please feel free to answer her
questions directly to her address at
LINDA [.....linda@spam@spamEraseMEWATSO94.FREESERVE.CO.UK]

When she reads the piclist FAQ at
http://www.piclist.com
and drops the nasty HTML SPAMvertizements, I will be happy to welcome her
back

---
James Newton
1-619-652-0593
.....jamesnewtonRemoveMEspamsxlist.com
SX FAQ: http://www.sxlist.com



{Original Message removed}

2001\02\12@095001 by Donald A.Poggemoeller

flavicon
face

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\13@111401 by Donald A.Poggemoeller

flavicon
face

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\26@042805 by Dhruba

flavicon
face
I am doing a project involving PIC16F877 and a zilog microprocessor where a
frequent
transfer of data is required between them and in both directions. I am using
the
parallel slave port for the purpose. my problem is while the pic knows
whether the
microprocessor has written a new data byte (while reading from the processor
) and
whether the microprocessor has read the previous byte(while writing to the
processor)
the processor has no way to do so. since in my case the processor is faster
than the pic
the processor either reads the same byte more than once or overwrites the
previously
written data before the pic is able to read it. I have solved the problem by
giving
a small delay between data transactions in the processor. but i think there
will be
better ways to do it. since i am a new entrant to this field i will be happy
to get
your help.

Dhruba

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads



'[PIC]:'
2001\03\02@142157 by Dennis Oliver
flavicon
face
I am attempting to do a A/D conversion to a signal ranging from -1 VDC to +5.5. VDC.  I am using a PIC16F877.  I understand to need to use the VREF, +VREF, and -VREF pins in order to do this.  The problem is that I have not found a good description of how to use/apply these pins.

Thanks
Dennis

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestSTOPspamspam@spam@mitvma.mit.edu


2001\03\02@145210 by Drew Vassallo

picon face
Grrrrrr!  Why do people constantly put their personal email addresses in the
"reply-to" field?  If you're posting the discussion on the list, you're
gonna get replied to on the list, dammit!

>I am attempting to do a A/D conversion to a signal ranging from -1 VDC to
>+5.5. VDC.  I am using a PIC16F877.  I understand to need to use the VREF,
>+VREF, and -VREF pins in order to do this.  The problem is that I have not
>found a good description of how to use/apply these pins.

This may be out of spec.  The analog input minimum voltage spec for Vain and
Vref- is Vss-0.3 Volts.  I don't know what the chip would do with
-1.0 V.

But other than that, I would imagine you could put whatever voltages you
wanted for Vref- and Vref+, as long as they were in spec.  Use a voltage
divider or voltage reference diode for the pin levels.

Configure your A/D control registers for whatever you want, i.e., select
channel/clock select bits in ADCON0 and set justification and Analog/Digital
pins in ADCON1.

Looks like you've got a lot of options with which pins you can use for
analog input and Vref's.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestEraseMEspam@spam@mitvma.mit.edu


2001\03\02@155431 by Dennis Oliver

flavicon
face
Drew,

Sorry if I rustled some feathers.  This is the first time that I have been
on this site.  Some of the lingo about list, etc. are greek to me at this
point.  I am a rookie at the site, and always open for suggestions.

{Original Message removed}

2001\03\02@162704 by Drew Vassallo

picon face
>Sorry if I rustled some feathers.  This is the first time that I have been
>on this site.  Some of the lingo about list, etc. are greek to me at this
>point.  I am a rookie at the site, and always open for suggestions.

Hahah, well, you did it again anyways :)

>From: Dennis Oliver <RemoveMEddoliverspamspamBeGoneDMCI.NET>
>Reply-To: Dennis Oliver <spamBeGoneddoliverKILLspamspam@spam@dmci.net>
>To: PICLISTspam_OUTspam@spam@MITVMA.MIT.EDU
>Subject: Re: [PIC]:
>Date: Fri, 2 Mar 2001 15:51:19 -0800


Besides, it's the information that's important... I wasn't REALLY mad, just
gets to be a pain to reopen another window just to get the PICLIST address.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-request@spam@spammitvma.mit.edu


2001\03\02@163322 by Steven J. Devine

flavicon
face
> >Sorry if I rustled some feathers.  This is the first time that I have been
> >on this site.  Some of the lingo about list, etc. are greek to me at this
> >point.  I am a rookie at the site, and always open for suggestions.
>
> Hahah, well, you did it again anyways :)
>
> >From: Dennis Oliver <RemoveMEddoliverEraseMEspamKILLspamDMCI.NET>
> >Reply-To: Dennis Oliver <spamBeGoneddoliverspam_OUTspamRemoveMEdmci.net>
> >To: .....PICLISTspamRemoveMEMITVMA.MIT.EDU
> >Subject: Re: [PIC]:
> >Date: Fri, 2 Mar 2001 15:51:19 -0800
>
> Besides, it's the information that's important... I wasn't REALLY mad, just
> gets to be a pain to reopen another window just to get the PICLIST address.

What, you don't have the PICLIST in your address book with an appropriate keyword (oh, I dunno, PICLIST?)?

Steve (NOT uing reply-to :-) ) Devine
------------------------------------------------------------------------
Steven J. Devine, President, Consultant, TZOGON Enterprises Incorporated
         President, EAA Chapter 136 (LWM/Merrimac Valley)
stevespam@spam@tzogon.com          HAM Tech lic: N1YZJ      http://www.tzogon.com
               http://www.tzogon.com/~steve/glass_cockpit
                 http://www.tzogon.com/~steve/stolch801
------------------------------------------------------------------------

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestRemoveMEspamSTOPspammitvma.mit.edu


2001\03\27@042304 by Jonathan Miller

flavicon
face
AD.

FOR SALE:
Hi all
     Is anyone interested in the following

RF solutions icepic-jnr-5x  emulates 12c508/509 16c52/54/55/56/57/58. #120

PIC-ICD debugger/programmer for 16f87x (advanced transdata corp). #80

Microchip promate programmer.#80

Dataman S4 programmer. #220

                                     Regards
                             Jonathan Miller

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestKILLspamspamTakeThisOuTmitvma.mit.edu


2001\03\27@122852 by Raymond Choat

flavicon
face
What prices?

----- Original Message -----
From: "Jonathan Miller" <spamBeGonejonathan.millerspam@spam@VIRGIN.NET>
To: <RemoveMEPICLISTspam_OUTspamMITVMA.MIT.EDU>
Sent: Tuesday, March 27, 2001 12:14 AM
Subject: [PIC]:


{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspam_OUTspammitvma.mit.edu


2001\03\27@123801 by D Lloyd

flavicon
face
part 1 1692 bytes content-type:text/plain; charset=us-ascii
As a guess, from the email address and the time it was posted.......not to
mention the values suggested, I'd say he was in the UK and they were UKP.

Of course, if they are US dollars, Australian dollars or, better still,
Italian Lire.........I'll have the S4 and the ICD!

Dan




(Embedded     Raymond Choat <RemoveMErcKILLspamspam@spam@KENAI.NET>KILLspamspam@spam@MITVMA.MIT.EDU>
image moved   27/03/2001 18:01
to file:
pic29421.pcx)





Please respond to pic microcontroller discussion list
     <PICLISTspamBeGonespam.....MITVMA.MIT.EDU>
Sent by:  pic microcontroller discussion list <KILLspamPICLISTspam.....MITVMA.MIT.EDU>


To:   spam_OUTPICLISTspamKILLspamMITVMA.MIT.EDU
cc:
Subject:  Re: [PIC]:

Security Level:?         Internal


What prices?

{Original Message removed}
part 2 165 bytes content-type:application/octet-stream; (decode)

part 3 105 bytes
--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestRemoveMEspamEraseMEmitvma.mit.edu


2001\03\27@140526 by Bob Ammerman

picon face
The prices are right in front of you. Look for # instead of $ :-)

----- Original Message -----
From: Raymond Choat <KILLspamrcspamspamBeGoneKENAI.NET>
To: <PICLISTspamspamMITVMA.MIT.EDU>
Sent: Tuesday, March 27, 2001 12:01 PM
Subject: Re: [PIC]:


{Quote hidden}

#120
{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestSTOPspamspammitvma.mit.edu


2001\03\28@110907 by EDU (1.8d)

flavicon
face
> What prices?
Unknown command - "WHAT". Try HELP.

> ----- Original Message -----
Unknown command - "-----". Try HELP.

> From: "Jonathan Miller" <RemoveMEjonathan.millerspamspamVIRGIN.NET>
Unknown command - "FROM:". Try HELP.

> To: <TakeThisOuTPICLISTspamspamRemoveMEMITVMA.MIT.EDU>
Unknown command - "TO:". Try HELP.

> Sent: Tuesday, March 27, 2001 12:14 AM
Unknown command - "SENT:". Try HELP.

> Subject: [PIC]:
Unknown command - "SUBJECT:". Try HELP.

{Quote hidden}

Your message did not contain any command. Note that lines starting with a
"greater than" sign ('>') are ignored.

Summary of resource utilization
-------------------------------
CPU time:        0.073 sec                Device I/O:        0
Overhead CPU:    0.012 sec                Paging I/O:        4
CPU model:        9121                    DASD model:     3390
Job origin:      spam_OUTPICLISTRemoveMEspamEraseMEMITVMA.MIT.EDU

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\03\28@124708 by Raymond Choat

flavicon
face
No I am from Kenai Alaska. Yep the cold place...ha.

----- Original Message -----
From: "D Lloyd" <TakeThisOuTdan.lloydRemoveMEspam@spam@GB.ABB.COM>
To: <EraseMEPICLISTRemoveMEspamMITVMA.MIT.EDU>
Sent: Tuesday, March 27, 2001 8:40 AM
Subject: Re: [PIC]:


{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads



'[PIC]:'
2001\04\05@152651 by Gary Faria
flavicon
face
Hi,
I'm looking for a way to generate a analog voltage form 0-5V using PWM on
the pic12c508 and How do I filter the output ripple?


Gary,

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservKILLspamspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\04\05@171551 by Thomas C. Sefranek

face picon face
Gary Faria wrote:

> Hi,
> I'm looking for a way to generate a analog voltage form 0-5V using PWM on
> the pic12c508 and How do I filter the output ripple?

Low Pass Filter.

>
>
> Gary,
>
> --
> http://www.piclist.com#nomail Going offline? Don't AutoReply us!
> email EraseMElistserv.....spamKILLspammitvma.mit.edu with SET PICList DIGEST in the body

--
 *
 |  __O    Thomas C. Sefranek  spamtcsspamcmcorp.com
 |_-\<,_   Amateur Radio Operator: WA1RHP
 (*)/ (*)  Bicycle mobile on 145.41, 448.625 MHz

ARRL Instructor, Technical Specialist, VE Contact.
hamradio.cmcorp.com/inventory/Inventory.html
http://www.harvardrepeater.org

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservSTOPspamspammitvma.mit.edu with SET PICList DIGEST in the body


2001\04\05@180629 by Olin Lathrop

face picon face
> I'm looking for a way to generate a analog voltage form 0-5V using PWM on
> the pic12c508 and How do I filter the output ripple?

With a low pass filter.  You want it to attenuate the PWM frequency to the
point its amplitude is sufficiently small, and you want it to not attenuate
the frequencies you are trying to produce below some acceptable limit.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, olinSTOPspamspamKILLspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listserv.....spamspammitvma.mit.edu with SET PICList DIGEST in the body


2001\04\19@093229 by sam woolf

flavicon
picon face
Does anyone have any simple subroutines for transmitting serial rs232 data
from a P16F84 with a 10 MHz crystal.. I'm a newbie and I've been having
endless problems with the code I've been using, and was hoping someone might
have something better..
cheers,
spamsamw.....spam.....cogs.susx.ac.uk

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\04\27@115439 by Greg Yadzinski

flavicon
face
I am having some difficulty calculating the expression: y=e^x using floating point routines on a PIC17C756A platform. Canned routines for converting integers to float type, floating point multiplication and divide and converting back to int type seem to work correctly, however the "extended" math functions illustrated in the Microchip app note #660 do not want to cooperate - I am attempting to use the EXP32() routine.

Any hints regarding this operation would be greatly appreciated.

Thanks,

Greg Yadzinski
Commonwealth Technology Inc.
greg.....spamcti1.net
Vox: (703) 719-6800
Fax: (703) 719-6631

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\04\30@150322 by David Dunn

flavicon
face
what sort of MCLR circuit would you guys recommend in a noisy environment (electrically noisy).

what i have right now is just MCLR tied to +5 via 10k resistor, and that works fine, but i'm getting resets every now
and then and i suspect something on the MCLR line.  can't really look at it with a scope because my scope leads are
picking up noise as well.

i have to be able to do ICSP with whatever i end up with.


thanks for your comments,



david dunn

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservspam_OUTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\04\30@153220 by Quentin

flavicon
face
For noisy industrial environments, for which most of my designs are for,
I would recommend:
Start with your power supply, and then MCLR.
Do some proper filtering on your power supply in both high and low
bandwidth. +1000microF cap and a 10nF cap before regulator, a 10nF after
regulator and a 10nF as close as possible to the PIC supply pins.
MCLR: I use a 10K and 1microF cap for slow start up to allow the PSU to
settle before PIC power up reset. This is only for power up and not to
eliminate sporadic resets.
MCLR can be tied directly to the supply line or with a low resistor (100
- 470 ohm). If you don't want a slow startup, then don't use a 10K
without a cap (IOW value is too high).
Oscillator and filter caps also as close as possible to PIC.
Also look at filtering on your input lines, here I have found most of my
problems. I use:
signal > 100ohm serial, 5.1 zener, 10nF cap to 0V, 4k7 pull-up > PIC.
All my inputs are always active when low (tied to 0V).

Quentin


David Dunn wrote:
{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body



'[PIC]:'
2001\05\02@224942 by Andrew Scott
flavicon
face
Hello,

I have a problem with interupts, I cannot use the call command.

my code is as follows:

       org     0x004            ; interrupt vector location

       bcf     STATUS,RP0
       bcf     STATUS,RP1
       movwf   w_temp            ; save off current W register contents
       movf    STATUS,0         ; move status register into W register
       movwf   status_temp       ; save off contents of STATUS register

       BCF     PCLATH,3
       BCF     PCLATH,4
;       call    test
;       BSF     PCLATH,3
;       BCF     PCLATH,4
;       call    keypad

       movf    status_temp,0     ; retrieve copy of STATUS register
       movwf   STATUS            ; restore pre-isr STATUS register contents
       swapf   w_temp,1
       swapf   w_temp,0          ; restore pre-isr W register contents
       bcf     INTCON,RBIF
       retfie                    ; return from interrupt

test
       nop
       return

What I want to do is eventually call the keypad module. At this stage I
cannot even call test. If the code is as is my program works (it runs
through and initalises a LCD amongst other things.) If I unrem the call test
line the program doesnt run - ie the LCD display doesnot get initalised.

I am using the RBIF to interrupt.

What am I doing wrong?

Any help is much appreciated.

Kind Regards,

Andrew Scott

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\02@230739 by Andrew Warren

face
flavicon
face
Andrew Scott <.....PICLIST.....spamRemoveMEMITVMA.MIT.EDU> wrote:

> I have a problem with interupts, I cannot use the call command.
>
> my code is as follows:
>
> [snip]
>
> What am I doing wrong?

Andrew:

You're not saving/restoring PCLATH in your interrupt routine.

-Andy


=== Andrew Warren - spam_OUTfastfwdTakeThisOuTspamEraseMEix.netcom.com
=== Fast Forward Engineering - San Diego, California
=== http://www.geocities.com/SiliconValley/2499

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\02@230757 by David Duffy

flavicon
face
Andrew Scott wrote:
{Quote hidden}

Shouldn't you be saving PCLATH when you enter the interrupt then do
your keypad thing, then restore PCLATH when you exit. At the moment,
you are destroying PCLATH and exiting the interrupt with PCLATH,3
still set. It's good practice to save/restore W, STATUS & PCLATH in
your interrupt routine as standard. Save headaches later on!  :-)
What page is you LCD init routine on?
Regards...

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\02@235226 by Andrew Scott

flavicon
face
The LCD init routine is on page 2.

Kind Regards,

Andrew Scott


-----Original Message-----
From: pic microcontroller discussion list
[EraseMEPICLISTspamBeGonespamKILLspamMITVMA.MIT.EDU]On Behalf Of David Duffy
Sent: Thursday, 3 May 2001 11:12 AM
To: RemoveMEPICLISTspamBeGonespamspamMITVMA.MIT.EDU
Subject: Re: [PIC]:


Andrew Scott wrote:
{Quote hidden}

contents
{Quote hidden}

test
>line the program doesnt run - ie the LCD display doesnot get initalised.
>
>I am using the RBIF to interrupt.

Shouldn't you be saving PCLATH when you enter the interrupt then do
your keypad thing, then restore PCLATH when you exit. At the moment,
you are destroying PCLATH and exiting the interrupt with PCLATH,3
still set. It's good practice to save/restore W, STATUS & PCLATH in
your interrupt routine as standard. Save headaches later on!  :-)
What page is you LCD init routine on?
Regards...

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\03@004248 by Andrew Warren

face
flavicon
face
Andrew Scott <@spam@PICLISTspamspamMITVMA.MIT.EDU> wrote:

> The LCD init routine is on page 2.

   So?

   Presumably, your non-interrupt code also contains jumps/calls to
   locations on pages OTHER than page 2. If an interrupt happens
   before any of THOSE jumps, your program will crash.

   -Andy


=== Andrew Warren - TakeThisOuTfastfwdKILLspamspam@spam@ix.netcom.com
=== Fast Forward Engineering - San Diego, California
=== http://www.geocities.com/SiliconValley/2499

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\05\03@090537 by Olin Lathrop

face picon face
>         org     0x004            ; interrupt vector location
>
>         bcf     STATUS,RP0
>         bcf     STATUS,RP1
>         movwf   w_temp            ; save off current W register contents
>         movf    STATUS,0         ; move status register into W register

The first two instructions irreversibly change STATUS before you save it.
This can seriously mess up the interrupted routine.  The manual explains how
to do this right.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, .....olinRemoveMEspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\05\29@043420 by Dylan Hillier

flavicon
face
Hola People,

I am looking for a document or website with info on it that will tell me
how to hookup an 8 bit data bus with an  address bus and control bus using
a PIC MCU.

Im hoping to use a PIC16F84A to do this with PortA as the address/control
bus and port B as the data bus.
I would like to ability to control up to 8 devices using the bus by simlpy
connecting them to the bus, much the same way as you would with an Device
Card in an ISA bus on a 'old school' PC.

Any ideas on this would be of great help...

Many thanks...

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



'[PIC]:'
2001\06\01@123745 by =?iso-8859-1?Q?=C5ke_Neehr?=
picon face
Hello!

Is there any Swedish who knows
if it´s possible to buy 16F870 on
any place in Sweden?

Regards
ÅkeN

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\06\01@163833 by Patrik Husfloen

picon face
ok, you might try the [BUY] tag instead..
also did you try elfa.se and rs-components.com ?

----- Original Message ----- From: "Åke Neehr" <KILLspamake.neehrspamTakeThisOuTTELIA.COM>
To: <TakeThisOuTPICLISTspamspam_OUTMITVMA.MIT.EDU>
Sent: Friday, June 01, 2001 6:33 PM
Subject: [PIC]:


Hello!

Is there any Swedish who knows
if it´s possible to buy 16F870 on
any place in Sweden?

Regards
ÅkeN

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\06\05@192655 by Fernando Barros

flavicon
face
Well need some help, i want to do this
I have an program on a 24c65 eeprom, and i wold like to pass to an at90s1200 flash, by only pressing one key, anyone can help doing that?
Tnx in advance
Fernando BArros

__________
http://www.IOL.pt
Todo o mundo passa por aqui!

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspamspamSTOPspammitvma.mit.edu


2001\06\05@194159 by Tony Nixon

flavicon
picon face
Fernando Barros wrote:
>
> Well need some help, i want to do this
>  I have an program on a 24c65 eeprom, and i wold like to pass to an at90s1200 flash, by only pressing one key, anyone can help doing that?
> Tnx in advance
> Fernando BArros
>
> __________
> http://www.IOL.pt
> Todo o mundo passa por aqui!
>
> --
> http://www.piclist.com hint: To leave the PICList
> .....piclist-unsubscribe-requestEraseMEspammitvma.mit.edu

I just did something like that with a flash PIC and a 24LC256 which may
give you some ideas.

http://www.bubblesoftonline.com/fob/fob.html


--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
spamBeGonesalesspamRemoveMEbubblesoftonline.com

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestEraseMEspammitvma.mit.edu


2001\06\06@150153 by Fernando Barros

flavicon
face
tnx, going to see what i can do
-----Mensagem original-----
De: Tony Nixon <spamTony.Nixonspam_OUTspam@spam@ENG.MONASH.EDU.AU>
Para: spamPICLIST@spam@spamSTOPspamMITVMA.MIT.EDU <spamBeGonePICLISTspamBeGonespam@spam@MITVMA.MIT.EDU>
Data: Quarta-feira, 6 de Junho de 2001 0:42
Assunto: Re: [PIC]:


Fernando Barros wrote:
>
> Well need some help, i want to do this
>  I have an program on a 24c65 eeprom, and i wold like to pass to an
at90s1200 flash, by only pressing one key, anyone can help doing that?
{Quote hidden}

I just did something like that with a flash PIC and a 24LC256 which may
give you some ideas.

http://www.bubblesoftonline.com/fob/fob.html


--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
salesKILLspamspamspambubblesoftonline.com

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-request@spam@spammitvma.mit.edu




__________
http://www.IOL.pt
Todo o mundo passa por aqui!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\06\15@163358 by Andrew Hall

flavicon
face
Hi,

Has anybody successfully programmed a 16F877 with a p16pro40 programmer and picall Windows software (in p16pro) mode ?

I have been using the 16F84 for some time with great success but am unable to get a 16F877 to program. It always fails at the
first program location (It reads back 3fff which Iguess is unprogrammed).  I read somewhere that the programmer clock line is connected to the RB3/PGM line and needs to be removed. I therefore
disconnected it (cut a PCB track) and wired RB3 to ground with a 10K resistor. This made no difference.
Does anybody have any suggestions/solutions to this problem please ?.


Cheers,

Andy H.

--
http://www.piclist.com hint: To leave the PICList
TakeThisOuTpiclist-unsubscribe-requestspam_OUTspammitvma.mit.edu


2001\06\20@133826 by Malcom Foster

picon face
[PIC]:

I was wondering if anybody could help me.
I have been given the task of investigating PIC's and more specifically whether one could be used to interface a number of serial ports into ONE serial or USB output.

I need to produce a short report on my findings, but can't seem to find any basic information about what a pic is.

Any information would be gratefully received, but please bare in mind that I have no experience whatsoever with PIC's and only limited experience with micro's (Z180).

Thanks for your time,

Malcom........

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-request.....spamTakeThisOuTmitvma.mit.edu


2001\06\20@135929 by asena

picon face
You can start by they manufacturer web site:  http://www.microchip.com
They have plenty of information to learn about!

Sena



{Quote hidden}

*********************************************************
Antonio Sergio Sena     CT2GPW
TakeThisOuTasenaEraseMEspamRemoveMEbigfoot.com
+ 44.785.5917270

BEng Electrical & Electronic Engineering
Heriot-Watt University - Edinburgh

Homepage: http://www.qsl.net/ct2gpw
*********************************************************

Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestRemoveMEspam.....mitvma.mit.edu


2001\06\20@152216 by David Cary

flavicon
face
Dear Malcom Foster,

Malcom Foster <spammoggs95KILLspamspamKILLspamBIGFOOT.COM> on 2001-06-20 12:28:51 PM
asked, more or less, ``what is a PIC ? Can it handle multiple serial ports ?''.

Antonio Sergio Sena <spamasenaspam_OUTspamBIGFOOT.COM> on 2001-06-20 12:57:07 PM responded with
 Microchip
 http://www.microchip.com/
which has the most detailed product information.

You might also be interested in skimming
 http://www.tinaja.com/picup01.html
 http://piclist.org/
.

In particular,
 http://piclist.org/techref/microchip/rs232.htm
has lots of information on using rs232 with PICs.
The ``Software only (bit bang)'' section talks about how to send and recieve on
multiple RS-232 ports, working around the limitation of only 1 hardware UART on
most PIC chips.

--
David Cary

--
http://www.piclist.com hint: To leave the PICList
STOPspampiclist-unsubscribe-requestspam_OUTspamspamBeGonemitvma.mit.edu


2001\06\20@152224 by Douglas Butler

flavicon
face
In the spectrum of modern microprocessors, the PIC family is dumb,
cheap, but fast.  In your project you don't have to do any math, just
moving data from one place to another.  A PIC is good for that.  However
if you are going the USB route you should look at processors that have
dedicated USB hardware (Cypress and maybe some very new PICs).

Sherpa Doug

> {Original Message removed}


'[PIC]:'
2001\07\18@034730 by Carole To
flavicon
face
[PIC]:Hi , I'd like to make an operation on a 16-bit data (like an addwf)in
assembler
I was wondering if this could be possible since the registers in the 16c717
are 8-bit wide.
So my question is : how can I make an operation on a 16-bit data( with the
MSB and LSB) and then separate the 8 MSB datas and the 8 LSB datas so that I
can store them in the SSPBUF register on the I²C bus?
Thanks

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\07\18@183256 by Tony Nixon

flavicon
picon face
Carole To wrote:
>
> [PIC]:Hi , I'd like to make an operation on a 16-bit data (like an addwf)in
> assembler
> I was wondering if this could be possible since the registers in the 16c717
> are 8-bit wide.
> So my question is : how can I make an operation on a 16-bit data( with the
> MSB and LSB) and then separate the 8 MSB datas and the 8 LSB datas so that I
> can store them in the SSPBUF register on the I²C bus?
> Thanks
>

       movf ByteL,W                ; low byte of 16 bit value
       addwf ResultL                ; add it to low result
       btfsc STATUS,C                ; increment high result if carry set
       incf ResultH

       movf ByteH,W                ; high byte of 16 but value
       addwf ResultH                ; add it to high result


       movf ResultH,W                ; send high result
       call SendToI2C
       movf ResultL,W                ; send low result
       call SendToI2C


-- Best regards

Tony

mICros
http://www.bubblesoftonline.com
spam_OUTsalesspamspamBeGonebubblesoftonline.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\07\19@055752 by Carole To

flavicon
face
Hi I have a problem .
I've connected a pic with a PLL and I wanna change the output frequency out
of the PLL
It does the frequency sweep (80MHZ -160MHZ) but the freq doesn't in its
latest value(160MHz).
Instead it does the cycle again over and over.
I've put a frequency a delay in between the frequency
Thanks for answering me

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body


2001\07\20@033129 by Carole To

flavicon
face
I 've got a problem:
I've connected mi PIC16c717 to a PLL
I am trying to make a program on the I2C bus which consists in making a
frequency sweep.
But the frequency ( 160MHz ) at which I want it to stop doesn't do this.
Instead it makes the same frequency sweep over and over and never ends.
I 've put a delay between each frequency change.
So if anyone could give me any tip about that.
Thanks

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestRemoveMEspammitvma.mit.edu


2001\07\20@034619 by Spehro Pefhany

picon face
At 09:26 AM 7/20/01 +0200, you wrote:
>I 've got a problem:
>I've connected mi PIC16c717 to a PLL
>I am trying to make a program on the I2C bus which consists in making a
>frequency sweep.
>But the frequency ( 160MHz ) at which I want it to stop doesn't do this.
>Instead it makes the same frequency sweep over and over and never ends.
>I 've put a delay between each frequency change.
>So if anyone could give me any tip about that.

Have you put some kind of deliberate stop or loop in your program, or
is it possible it is running through all the unused memory, wrapping
the PC around and starting again?

Best regards,


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffspamspam_OUTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestEraseMEspamspammitvma.mit.edu



'[PIC]:'
2001\08\17@103652 by Dennis Oliver
flavicon
face
I am trying to figure out a way to measure a DC voltage that ranges from -0.9V to +12.5V.  I ideally would like to just add 1V to the signal, and then use a voltage divider to get it to the 0 to +5V range of a PIC.  How do I condition the signal???

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\08\17@105547 by Spehro Pefhany

picon face
At 10:33 AM 8/17/01 -0700, you wrote:
>I am trying to figure out a way to measure a DC voltage that ranges from
-0.9V to +12.5V.  I ideally would like to just add 1V to the signal, and
then use a voltage divider to get it to the 0 to +5V range of a PIC.  How
do I condition the signal???
              +5
              |
             [R2]
in             |
o-----[R1]-----x-------------> pic
              |
             [R3]
              |
              0V

Try R2 = 100K
=> R1 = 18K
&  R3 = 7K2

You can scale these equally to get close to standard E-96 1% values, just
be careful
about the source impedance looking back from the PIC pin (see the data
sheet for the maximum,
based on leakage), and the input impedance of this circuit is about 25K
looking into the
"in" node, with the values show.

Best regards,
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffTakeThisOuTspamKILLspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\08\17@110116 by cision Electronic Solutions

flavicon
face
Use a three resistor setup: one resistor to the +5V connected to another
resistor to ground.  Add the third between the voltage you want to measure
and the common node of the other two.  Use algebra to calculate the needed
values.

{Original Message removed}

2001\08\17@110521 by Chris Carr

flavicon
face
Use an operational amplifier to sum the incoming signal with +1 volt. Choose
the resistor values to give a gain of 0.37 on the incoming signals. You
don't need the voltage divider.

Also the fixed voltage does not need to be +1 volt, although it does make
the resistor value calculations slightly simpler.

Regards

Chris Carr

{Original Message removed}


'[PIC]:'
2001\09\07@063849 by Ferdinandsson
flavicon
face
Hello!

I have a mindbuzz.
I am writing a code in mplab (assemblercode, not C) and have a 1 byte
register in memory called count.
My question is: Is there a instruction or code that moves the adress of
a labelled register to the W-register or the FSR-register and not the
value in the register. I mean something like MOVFW "LABEL" but for the
adress to the register called "LABEL" and not the value in it.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\09\07@073106 by Kevin Blain

flavicon
face
movlw  LABEL


puts the constant defined by label (i.e. the address of the register) into
w.



Regards, Kevin


{Original Message removed}

2001\09\07@074813 by Andrew Stubbins

flavicon
face
You can do this by:-

movlw   LABEL


regards

Andy

{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listserv.....spam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2001\09\07@081543 by Andy Kelley N1YEW

picon face
Joakim Ferdinandsson writes:dada> Hello!da> da> I have a mindbuzz.da> I am
writing a code in mplab (assemblercode, not C) and have a 1 byteda>
register in memory called count.da> My question is: Is there a instruction
or code that moves the adress ofda> a labelled register to the W-register
or the FSR-register and not theda> value in the register. I mean something
like MOVFW "LABEL" but for theda> adress to the register called "LABEL" and
not the value in it.dadawhy not try....damovlw LABEL ;; load the address as
a literaldamovwf FSR  ;; put it where u wishdadaAndy N1YEWdaLinux is cool
cause I cant get infected :-P not like WinME, which gotdaW95.CIH, and had
to trash *almost* all of my files...

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2001\09\07@091844 by Olin Lathrop

face picon face
>>
I am writing a code in mplab (assemblercode, not C) and have a 1 byte
register in memory called count.
My question is: Is there a instruction or code that moves the adress of
a labelled register to the W-register or the FSR-register and not the
value in the register. I mean something like MOVFW "LABEL" but for the
adress to the register called "LABEL" and not the value in it.
<<

  movlw  count    ;low 8 bits of COUNT's address into W
  movf   count, w ;contents of COUNT into W, assuming bank settings


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, EraseMEolin.....spamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamlistservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2001\09\07@114356 by uter van ooijen & floortje hanneman

picon face
> movlw  LABEL
> puts the constant defined by label
> (i.e. the address of the register) into W

But beware that it can only move the lower 8 bits into W, on some PICs
(16F877 for instance) you might need to take care of the higher bits.

Wouter van Ooijen

Van Ooijen Technische Informatica: http://www.voti.nl
Jal compiler for PIC uC's:  http://www.xs4all.nl/~wf/wouter/pic/jal

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\09\27@095817 by Salym Asp.

picon face
Dear Sir,

What I need I really important.
I thank you in advance for you help.

I need to create the following application:
- Delayed auditory feedback (1)
- Frequency shifted auditory feedback (2)

(1)  when you speak, you listen to your own voice with a delay (scalable to 1
to 500 ms)
(2) you listen to your voice without a delay but the pitch has changed (-1/2,
-1, +1/2, +1 octave)

the (1) and (2) may be used same time or separately.

And when no voice is detected a sound of 125 Hz is generated (the suond can
be generated by a 555 timer but if the PIC can do it, please let me know)

I need someone who can help me

The device is used for a therapy. My best friend has an illness and I think I
can help him with auditory feedback therapy. I use a music device and it work
more or less. It's why I want to create an accurate, selfcontained PIC based
device for my friend and for anyone who have the same illness.

Thank you a lot. for helping me.

SAYM
France

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservRemoveMEspammitvma.mit.edu with SET PICList DIGEST in the body


2001\09\27@124349 by Olin Lathrop

face picon face
> I need to create the following application:
> - Delayed auditory feedback (1)
> - Frequency shifted auditory feedback (2)
>
> (1)  when you speak, you listen to your own voice with a delay (scalable
to 1
> to 500 ms)
> (2) you listen to your voice without a delay but the pitch has changed
(-1/2,
> -1, +1/2, +1 octave)
>
> the (1) and (2) may be used same time or separately.
>
> And when no voice is detected a sound of 125 Hz is generated (the suond
can
> be generated by a 555 timer but if the PIC can do it, please let me know)

This is a bit much for a PIC.  For starters, you need to sample voice around
8KHz.  This means you need to store at least 4000 samples to get the 1/2
second delay.  A PIC could do this with external memory.  The best way to
change the pitch is probably a software heterodyne.  This is definitely
beyond a PIC.  You need to a DSP.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, TakeThisOuTolin@spam@spam@spam@embedinc.com, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservspamspammitvma.mit.edu with SET PICList DIGEST in the body


2001\09\27@164724 by Lasse Madsen

flavicon
face
Doesn't Microchip make PIC's with DSP's ?

I believe that its posted on their index page ?

just a hint

regards
lasse Madsen

{Original Message removed}

2001\09\28@090545 by Olin Lathrop

face picon face
> Doesn't Microchip make PIC's with DSP's ?

Not yet.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, KILLspamolinKILLspamspamspamBeGoneembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestKILLspamspammitvma.mit.edu


2001\09\28@132011 by Lasse Madsen

flavicon
face
What would you call their dsPIC's then ?

they are blown up on their front page...

lasse

----- Original Message -----
From: "Olin Lathrop" <olin_piclist@spam@spamKILLspamEMBEDINC.COM>
To: <EraseMEPICLISTRemoveMEspam@spam@MITVMA.MIT.EDU>
Sent: Friday, September 28, 2001 1:44 PM
Subject: Re: [PIC]:


{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestRemoveMEspamRemoveMEmitvma.mit.edu


2001\09\28@151050 by Olin Lathrop

face picon face
> > > Doesn't Microchip make PIC's with DSP's ?
> >
> > Not yet.
>
> What would you call their dsPIC's then ?

Vaporware?  Microchip will supposedly have dsPICs, but not yet.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, @spam@olinspamBeGonespamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestspamspammitvma.mit.edu


2001\09\28@160325 by Lasse Madsen

flavicon
face
> Vapourware?  Microchip will supposedly have dsPICs, but not yet.

Oh i didnt read the entire article around them so this i didnt knew

Thanks for passing the information.

best regards
lasse madsen


{Original Message removed}

2001\09\28@202329 by Mick Kent

flavicon
face
The dsPIC is the function of some adman's imagination; just try to buy one!
----- Original Message -----
From: "Lasse Madsen" <spamLasse.madsenspamspamspamELEKTRONIK.DK>
To: <spamBeGonePICLISTKILLspamspamKILLspamMITVMA.MIT.EDU>
Sent: Friday, September 28, 2001 12:20 PM
Subject: Re: [PIC]:


| What would you call their dsPIC's then ?
|
| they are blown up on their front page...
|
| lasse
|
| ----- Original Message -----
| From: "Olin Lathrop" <TakeThisOuTolin_piclistspamspamEMBEDINC.COM>
| To: <spamBeGonePICLISTspamMITVMA.MIT.EDU>
| Sent: Friday, September 28, 2001 1:44 PM
| Subject: Re: [PIC]:
|
|
| > > Doesn't Microchip make PIC's with DSP's ?
| >
| > Not yet.
| >
| >
| > ********************************************************************
| > Olin Lathrop, embedded systems consultant in Littleton Massachusetts
| > (978) 742-9014, EraseMEolinEraseMEspamembedinc.com, http://www.embedinc.com
| >
| > --
| > http://www.piclist.com hint: To leave the PICList
| > spamBeGonepiclist-unsubscribe-requestspam_OUTspam.....mitvma.mit.edu> | >
| >
| >
| >
|
| --
|
http://www.piclist.com hint: To leave the PICList
| spampiclist-unsubscribe-requestspammitvma.mit.edu> |
|

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestKILLspamspamKILLspammitvma.mit.edu


2001\09\28@212823 by Bob Ammerman

picon face
You can't buy it yet, but I've written code for it and run it on the
simulator in the new MPLAB-32.

I am pretty sure that mChip is at or very close to first silicon on it.

It is (will be) a very sweet chip!

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)



{Original Message removed}


'[PIC]:'
2001\10\07@100553 by brah
flavicon
face
Hi all
What happens to the return address on the stack if a call is terminated
before the return is reached?
e.g.

one     call    three

three   movlw   0x02       ;do something - load temp with a number
       movwf   temp

four    decfsz  temp,f     ;then do a test or comparison
       goto    one

return                     ;from the call three

In the above, the return is never reached, but the calls keep stacking
up
Wouldn't the stack fill up with return addresses?
E.g. an interrupt could branch away at four, instead of the code shown,
and not be required to come back to the line after four with an retfie.
Regards Howard.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspamBeGonespamspammitvma.mit.edu with SET PICList DIGEST in the body


2001\10\07@104342 by James Caska

picon face
The stack fills up until it gets to the end of the stackspace where it then
rolls over back to the first stack element.

If you know the depth of your entry point you can use this technique to
flush the stack :-) Which can be handy if you need to abruptly exit a call
path.

Regards,
James Caska
KILLspamcaskaspamvirtualbreadboard.com
ujVM - 'The worlds smallest java virtual machine'


{Original Message removed}

2001\10\07@182200 by Olin Lathrop

face picon face
> What happens to the return address on the stack if a call is terminated
> before the return is reached?

A call is a single instruction, not an ongoing thing.  It makes no sense to
talk about "terminating" a call.  It's important to remember that a
subroutine is an abstraction we use for code that is entered with a CALL and
exited with a RETURN.  The processor simply executes CALL and RETURN
instructions as they are encountered, and makes no distinction about being
in a subroutine or not.

{Quote hidden}

Yes.  The stack is really circular, so after a while new CALLs would
overwrite the return addresses from old CALLs.  This in itself is not a
problem until an attempt is made to return to one of the overwritten call
addresses.  That will likely result in unintended behaviour.  This example
essentially uses a CALL like a GOTO and ignores the CALL's effect on the
stack.

> E.g. an interrupt could branch away at four, instead of the code shown,
> and not be required to come back to the line after four with an retfie.

Huh?  I don't understand the point you are trying to make here.  Yes it is
possible to enable interrupts in such a way one could occur while the
instruction at FOUR is being executed.  This would cause the PC to be saved
on the stack, interrupts to be globally disabled, and execution would
continue at address 4.  What the interrupt routine is required to do is
completely up to you.  Once again, the processor has no notion of being "in"
an interrupt, just like it has no notion of being "in" a subroutine.  If a
normal interrupt routine is at location 4, then it will return to the
interrupted routine via a RETFIE instruction.  This will return the top of
the stack to what it was right before the interrupt occurred.  Note that the
interrupt did use one stack location.  If the stack was already full, then
the oldest address on the stack will have been overwritten.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, olinspam_OUTspamspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2001\10\07@182213 by Olin Lathrop

face picon face
> If you know the depth of your entry point you can use this technique to
> flush the stack :-) Which can be handy if you need to abruptly exit a call
> path.

How is messing about with the stack more "handy" than doing a GOTO?


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, spamBeGoneolin.....spamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listserv@spam@spammitvma.mit.edu with SET PICList DIGEST in the body


2001\10\07@195028 by Bob Barr

picon face
Olin Lathrop wrote:
>
> > If you know the depth of your entry point you can use this technique to
> > flush the stack :-) Which can be handy if you need to abruptly exit a
>call
> > path.
>
>How is messing about with the stack more "handy" than doing a GOTO?
>

Is it really even possible to 'flush' the stack?

The limited number of PIC types that I have worked with don't have any way
(other than calls and returns) of affecting the stack.

Do some PIC types provide direct stack pointer control?

Regards, Bob

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservspammitvma.mit.edu with SET PICList DIGEST in the body


2001\10\07@200921 by James Caska

picon face
Consider Abrupt Exception Handling such as used in java try/catch..

Consider an exception handler whereby on a detected error you want to handle
the error and then continue execution from the error handler WITHOUT
returning to the original call path. Using GOTO doesn't cut it because the
stack is still full of return addresses so when you use CALL/RETURN again
you get a non-deterministic stack result.

In this example, using a GOTO for an error handler simply continues to build
up the stack.

You need to be more clever than GOTO to handle abrupt exceptions in a
deterministic fashion.


ExceptionGenerator:
       ;Error Detected
       GOTO    ExceptionHandler
       ;No Error
       RETURN

TryGOTOExceptionHandler:
       ;try{
               CALL ExceptionGenerator
               ;Code Not Reached
       ;}catch(Exception e){
       ExceptionHandler:
               RETURN
       ;}

       RETURN


;=========
MAIN
       CALL    TryGOTOExceptionHandler
       GOTO    MAIN




{Original Message removed}

2001\10\07@201052 by James Caska

picon face
Its not a direct stack pointer control rather a 'Trick' to gain some control
over the stack pointer. There are numerous reasons why you would like
control over the stack pointer, the abrupt exception handling concept was
used only as an example. Some of the higher end PIC's have push and pop
operators which allow direct stack manipulations but I was refering to the
ability to take advantage of the circular buffer employed by the stack.

Regards,
James Caska
caskaRemoveMEspamvirtualbreadboard.com
ujVM - 'The worlds smallest java virtual machine'


{Original Message removed}

2001\10\07@220520 by cision Electronic Solutions

flavicon
face
James,
I have often used pop and push operators on processors where they were
available in order to affect program direction upon leaving an interrupt
routine, which was based upon tasks performed within that interrupt routine.

I would suggest that you experiment with whatever task you were thinking
about that prompted your email, then report back to the group with your
findings.  I can see where it might be possible to exploit the stack as you
have suggested, but I can also see that the idea needs a lot of refinement
before it would be useful.  Sounds like pop and push without explicit
operators...  I have some vague ideas about how it could be done, but they
are not well thought out nor elegant.

Regards,
Ed


{Original Message removed}

2001\10\07@232857 by dpharris

picon face
The new 18F series have a more easy to use stack.
David


Bob Barr wrote:

{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspam_OUTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\10\08@031651 by James Caska

picon face
While the technique is not a POP operator, rather a flush operator it allows
some control over the stack which can be very useful for things like abrupt
call path exit (push/pop operators in higher processors are there for a
reason).  I agree the technique must be used with care, but when used in a
controlled fashion it can solve difficult problems. I developed the
technique when developing the uj just-in-time java compiler for the
PIC16F877 for managing exception handling which java uses heavily and is one
of the keys to its robustness.

Here is an example of what I am talking about... Warning! When you run this
in MPLAB, it will generate a stack-overflow exception, which is normal and
the feature you are taking advantage of actually, you may need to switch off
the stack overflow breakpoint if you want to run it. I tested the code and
it works.

The trick is to know your call depth, if you do then you can flush the
stack, and jump out of the call path carry on execution in a known state.


;*********************************************************************
;                                                                    *
;       FLUSH STACK                                                                *
;                                                                    *
;*********************************************************************
;*      TARGET PIC16F877
;*********************************************************************
;       Demonstrates Flushing the stack to execute an abrupt call path exit
;*********************************************************************
;*      @version        0.1, 8 October 2001
;*      @author         James Caska
;*********************************************************************

       list      p=16F877
       #include <p16F877.inc>

StackDepth      EQU     .32

       ORG     .0
       GOTO    MAIN



OKNowAbruptlyExitTheCallPath
       MOVLW   .5      ;The trick is to know your call depth (MaxDepth-CurrentDepth)
       MOVWF   StackDepth
FlushStackLoop
       DECFSZ  StackDepth,F
       CALL    FlushStackLoop
       GOTO    MAIN.OnException.AbruptHandler

       RETURN  ;Never Reach Here

CallWithAbruptExitDepth3                        ;Build up a stack path
       CALL    OKNowAbruptlyExitTheCallPath
       RETURN  ;Never Reached

CallWithAbruptExitDepth2
       CALL    CallWithAbruptExitDepth3        ;Build up a stack path
       RETURN  ;Never Reached

CallWithAbruptExitDepth1
       CALL    CallWithAbruptExitDepth2        ;Build up a stack path
       RETURN  ;Never Reached


CallWithRegularReturn
       ;Code Here
       RETURN

MAIN
       CALL    CallWithAbruptExitDepth1
MAIN.OnException.AbruptHandler
       CALL    CallWithRegularReturn

       GOTO    MAIN

       END

Regards,
James Caska
spam_OUTcaska@spam@spamRemoveMEvirtualbreadboard.com
ujVM - 'The worlds smallest java virtual machine'

{Original Message removed}

2001\10\08@090643 by Olin Lathrop

face picon face
> >How is messing about with the stack more "handy" than doing a GOTO?
> >
>
> Is it really even possible to 'flush' the stack?

No, and if you could there wouldn't be much point to it.  You could
deliberately overflow the stack to set all entries to the address after a
particular CALL, but again I don't see much point to this.

> The limited number of PIC types that I have worked with don't have any way
> (other than calls and returns) of affecting the stack.
>
> Do some PIC types provide direct stack pointer control?

The 18xxx family does have more software access to the stack, but I think
this discussion was generally about the other PICs.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, spamolinspamspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestspam_OUTspammitvma.mit.edu


2001\10\08@090646 by Olin Lathrop

face picon face
> Consider Abrupt Exception Handling such as used in java try/catch..
>
> Consider an exception handler whereby on a detected error you want to
handle
> the error and then continue execution from the error handler WITHOUT
> returning to the original call path. Using GOTO doesn't cut it because the
> stack is still full of return addresses so when you use CALL/RETURN again
> you get a non-deterministic stack result.

You can mess up the stack all you want and then do a bunch of CALL/RETURN
pairs nested to the stack size and all will work as it should.  Just don't
try to do a RETURN without a CALL.

> In this example, using a GOTO for an error handler simply continues to
build
{Quote hidden}

You can't do this as written on most PICs.  At minimum, this requires the
ability to pop the top entry from the stack without corrupting the rest of
the stack.  The 12xxx, 16xxx, and 17xxx PICs simply can't do this.  You can
do this on an 18xxx PIC by decrementing the stack pointer before the GOTO
ExceptionHandler instruction.

On 16xxx PICs you would need to set some hidden state inside
ExceptionGenerator to indicate whether returning with an exception or not
then RETURN.  TryGOTOExceptionHandler would have to check this state to
decide whether an exception occurred.  This could be hidden by a compiler,
but we're talking about how to use the stack at the instruction level.

{Quote hidden}

********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, .....olinspam.....embedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
spampiclist-unsubscribe-requestKILLspamspammitvma.mit.edu


2001\10\08@090650 by Olin Lathrop

face picon face
> Its not a direct stack pointer control rather a 'Trick' to gain some
control
> over the stack pointer.

Because the stack is circular, and you can only "control" the stack pointer
by pushing a new address onto the stack, you end up trashing the stack
contents in the process.

> There are numerous reasons why you would like
> control over the stack pointer, the abrupt exception handling concept was
> used only as an example. Some of the higher end PIC's have push and pop
> operators which allow direct stack manipulations but I was refering to the
> ability to take advantage of the circular buffer employed by the stack.

Your example only showed why you might want to control the stack.  I have no
argument with that, as you said there are other reasons too (true tasks,
profiling, ...).  My point is that you can't do any of these with the
features available on 16 family PICs.  Go ahead, show me how to actually
implement your exception handler example by stack manipulation on a 16F877.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, RemoveMEolinRemoveMEspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-request.....spamKILLspammitvma.mit.edu


2001\10\08@091847 by Scott Dattalo

face
flavicon
face
On Sun, 7 Oct 2001, Bob Barr wrote:

> Olin Lathrop wrote:
> >
> > > If you know the depth of your entry point you can use this technique to
> > > flush the stack :-) Which can be handy if you need to abruptly exit a
> >call
> > > path.
> >
> >How is messing about with the stack more "handy" than doing a GOTO?
> >
>
> Is it really even possible to 'flush' the stack?




FlushStack:
   movlw   -8

FS1:
   call    FS2
FS2:
   addlw   1

   skpc
    goto   FS1:


----------------------

On the 12-bit cores:

FlushStack:
   call    $+1
   call    $+1


For most applications, stack flushing is useless. However, there are two
things you can do. You can preload the stack with return addresses and
create a "state machine" that makes no calls - only returns (and goto's).
This could be useful for a tiny RTOS or perhaps a co-routine approach. The
other use would be to preload the stack to catch stack underflows.


Scott

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspam_OUTspamspam_OUTmitvma.mit.edu


2001\10\08@105113 by Olin Lathrop

face picon face
> OKNowAbruptlyExitTheCallPath
>         MOVLW   .5      ;The trick is to know your call depth
(MaxDepth-CurrentDepth)
>         MOVWF   StackDepth
> FlushStackLoop
>         DECFSZ  StackDepth,F
>         CALL    FlushStackLoop
>         GOTO    MAIN.OnException.AbruptHandler

All you are really doing here is a GOTO to a fixed address, which has to be
in top level code.  All the stack diddling is just a waste of time.  It
doesn't matter what's on the stack as long as you don't intend to return to
any of it.  It seems you want to "reset" the stack pointer.  The stack is
circular, so you can "reset" the stack any time you like just be deciding
never to return to any called-from routine, which you have to do anyway if
you were able to "empty" the stack.  Your entire
OKNowAbruptlyExitTheCallPath routine could be replaced by the single GOTO
MAIN.OnException.AbruptHandler with no effect on the program.

Your other example was jumping to an exception handler, then continuing to
return to higher call levels from there.  That can't be done on a 16F877 by
stack manipulation alone.  The example here only works because the exception
handler is not nested inside a subroutine you intend to return from.

{Quote hidden}

********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, KILLspamolinspam@spam@embedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestRemoveMEspammitvma.mit.edu


2001\10\08@213139 by James Caska

picon face
Hi,

Just to re-iterate. All I ever said was that it can be "handy" to flush the
stack and that in a controlled environment can solve some difficult problems
like Abrupt Call Path exit which can be used for Exception Handling in a
controlled environment. I never said it was a pop, and only ever pointed it
out as a 'trick' to gain some control over the stack.

Regards,
James Caska
caska@spam@spamEraseMEvirtualbreadboard.com
ujVM - 'The worlds smallest java virtual machine'




{Original Message removed}

2001\10\09@003513 by Scott Dattalo

face
flavicon
face
On Tue, 9 Oct 2001, James Caska wrote:

> Hi,
>
> Just to re-iterate. All I ever said was that it can be "handy" to flush the
> stack and that in a controlled environment can solve some difficult problems
> like Abrupt Call Path exit which can be used for Exception Handling in a
> controlled environment. I never said it was a pop, and only ever pointed it
> out as a 'trick' to gain some control over the stack.




Here's a trick where stack stuffing is useful. I alluded to it earlier,
but it probably wasn't too obvious. I haven't actually had a need for this
kind of code (well, not exactly this kind, but something similar).


Install1
    goto   init_task1
Install2
    goto   init_task2
Install3
    goto   init_task3
...
Install8
    goto   init_task8

start
    return


;----------------- Tasks ------------------------
init_task1
    call   Install2  ; This call places the address of 'task1'
                     ; on the call stack. Install2 doesn't return.
task1
 ; task 1 code - contains no calls
   ....

 ; do stuff
 ; when done, exit with a return

   return     ; run next task


init_task2
    call   Install3
task2

   ....

   return


.....



init_task8
    call   start
task8

   ....

   return



The idea is that the stack is pre-loaded with return addresses that point
to the beginning of each "task". When a task is completed, it executes a
return.  This will send control to the next task. This can continue
indefinitely since the stack will roll over after eight returns have been
excuted.

The major limitation is that none of the tasks can make a call. This will
destroy the contents on the stack. Similary, interrupts cannot be enabled.

Again, I think this approach is little more than an intellectual
curiosity. The same kind of programming can be achieved with goto's
replacing the returns. Then the call limitation can be removed.

Scott

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\09@053056 by James Caska

picon face
On Tuesday, 9 October 2001 2:34 PM, Scott Dattalo wrote

Hi,

I have used this technique also :-). I think someone pointed it out earlier,
that there is no need for a subroutine to return its own call. Another
variation on this one is for example instead of calling individual tasks you
had a call to a jump vector, you could use the technique for a command
interpreter whereby the routine called will return in-place as you have
described here but the actual subroutine "called" would the interpreted
result of some bytecode... and if it created an error you could even jump to
an exception handler ;-)

>Again, I think this approach is little more than an intellectual
>curiosity. The same kind of programming can be achieved with goto's
>replacing the returns. Then the call limitation can be removed.

Agreed :-)

Regards,
James Caska
spam_OUTcaskaspam_OUTspamRemoveMEvirtualbreadboard.com
ujVM - 'The worlds smallest java virtual machine'



{Original Message removed}

2001\10\15@162259 by 1?Q?Benjamin_Menk=FCc?=

flavicon
face
What is the formula for calculating f of a rc-osci ?

regards,

BEn

--------------------------
Benjamin Menküc
Auto-Intern GmbH
Haberlandstr. 125
44359 Dortmund
Tel: 0231-1893070
Fax: 0231-93699548
http://www.auto-intern.com


Meinen PGP-Schlüssel kann man unter:

http://www.auto-intern.com/php/pgp_menkuec.php

finden.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\10\15@165457 by Dennis Noordsij

flavicon
face
On Monday 15 October 2001 23:20, you wrote:
> What is the formula for calculating f of a rc-osci ?
>
> regards,
>
> BEn

Hi Ben,

Try http://www.piclist.com/techref/microchip/osc.htm

<snip>
The least accurate method would be an RC ( resistor capacitor ) network
connected to pin 15. The RC mode can be used when timing is not a critical
concern such as when two inputs are high, the desired output goes high. The
time constant of the RC network determines the frequency, where

t = R * C

and

f=1 / T

t = time in Seconds
R = resistance in Ohms
C = capacitance in Farads
f = frequency in Hertz

It is recommended that if you do plan to use the RC frequency standard
method, the resistor values should remain between 5 K and 100 K which would
require a capacitor value of approximately 20 pF. Resistances <= 2.2k may
cause the oscillator to become unstable or stop altogether. Extremely high
resistances such as 1 Meg can cause the oscillator to become overly sensitive
to noise, humidity and leakage.

Inexpensive resistors and capacitors do not have tolerances capable of
providing an accurate clock frequency which is good enough for measuring
time, transmitting or receiving serial information and other time measurement
or time critical applications. Standard < watt resistors commonly have a
tolerance of 1% and ceramic capacitors would have a tolerance of
approximately 5%. RC components having a sufficient tolerance for serial
communications would be considerably more expensive than the other options
available as a good frequency standard.
</snip>

Regards,
Dennis

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\10\15@165905 by iklas Wennerstrand

picon face
Hello Benjamin,

There is no explicit equation to calculate the frequency for a RC oscillator
on a PIC.
There is to much unknown data inside the PIC that is not mentioned in the
data book.
You might look for a simple equation like f=1/(RC) or similar but that is a
simplified model and to have a correct model you need more data. Maybe there
is some one that have extrapolated a working equation but the easiest way is
to test the R and C by hand.
In the data book for the PIC you use it is usually mentioned a table with
start values on R and C for different frequencies. Use a Resistor decade
ladder or similar to create your own list for other values not mentioned.
Note: RC-oscillator is for frequency insensitive applications and varies
with temperature, R and C tolerance and normal process parameter variations
inside the PIC.

Regards
Niklas


-----Ursprungligt meddelande-----
Från: pic microcontroller discussion list [RemoveMEPICLISTspam.....MITVMA.MIT.EDU]
För Benjamin Menküc
Skickat:        den 15 oktober 2001 22:20
Till:   spamPICLIST@spam@spamMITVMA.MIT.EDU
Ämne: [PIC]:

What is the formula for calculating f of a rc-osci ?

regards,

BEn

--------------------------
Benjamin Menküc
Auto-Intern GmbH
Haberlandstr. 125
44359 Dortmund
Tel: 0231-1893070
Fax: 0231-93699548
http://www.auto-intern.com


Meinen PGP-Schlüssel kann man unter:

http://www.auto-intern.com/php/pgp_menkuec.php

finden.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\10\17@070236 by Jo Scherpenisse

flavicon
face
Random generator.
I often make pic-based controllers that controls random processes (p.e. for
art objects or noise).
I found the following routine very useful, perhaps other PIC-users can use
this routine too.

;Random routine for making random numbers.
;Initialyze ran1 en ran2 at beginning of program.
;They should not be both zero!
;Return with 8 bits random number in w.
;Theory from: The art of electronics, Horowitz and Hill

;first written in TechTools assembler
random     mov     w, ran2
       and     w, #01100000b
       snz
       jmp     ransh
       xor     w, #01100000b
       stc
       snz
ransh   clc
ransh1  rl      ran1
       rl      ran2
       mov     w, ran1
       ret


;written in Microchip native assembler
random    movf    ran2
   andlw    0x60
   btfsc    3,2 ;skip if non zero
   goto    ransh
   xorlw    0x60
   bsf    3,0 ;set carrybit
   btfsc    3,2 ;skip if non zero
ransh    bcf    3.0 ;clear carrybit
ransh1    rlf     ran1
   rlf    ran2
   movf    ran1
   return
;
;use
; call random
;at return random value in w

;Jo Scherpenisse
;Koninklijk Conservatorium
;Juliana van Stolberglaan 1
;2595 CA  Den Haag
;Netherlands
===========================
Jo Scherpenisse    scherpTakeThisOuTspamkoncon.nl
Koninklijk Conservatorium
Elektronische Dienst
Juliana van Stolberglaan 1
2595 CA Den Haag
070-3814251 (fax 070-3853941)
===========================

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\10\25@183637 by Luke Murphy

flavicon
face
[PIC]: We are creating simple machine to machine control systems (eg. activate switch on receipt of appropriate command) using GSM Nokia 5110's controlled by PIC16F877, and would appreciate any help with existing code, ideas, development tools, contacts etc..


Many Thanks


Luke Murphy

Mobile Control & Monitoring P/L

Australia PS This is my 1st post so I hope I got it right!

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics



'[PIC]:'
2001\11\27@053911 by chael Mennecier
flavicon
face
Hello.

This is my first post on PICList.

On P12C508A, datasheet says that gprs are unknown on POR. Is it really true
or there is 99% of chance that it will be 0.

Thank you.

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspamKILLspammitvma.mit.edu


2001\11\27@113515 by Byron A Jeff

face picon face
On Tue, Nov 27, 2001 at 11:26:15AM +0100, Michael Mennecier wrote:
> Hello.
>
> This is my first post on PICList.
>
> On P12C508A, datasheet says that gprs are unknown on POR. Is it really true
> or there is 99% of chance that it will be 0.

Unknown means you don't know the percentage chance. It can vary by the chip,
the phase of the moon, or any other factor. It's unknown.

It's best to be sure and to set it upon reset.

BAJ

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestEraseMEspammitvma.mit.edu



'[Pic]:'
2002\01\11@034751 by Rod Phillips
picon face
Hi Guys,

Thanks to those who responded to my question about the long cable run.  I am
able to use stiff pulldown resistors on the inputs, so hopefully noise
pickup won't be a factor on the inputs.  I just need to make sure that I
don't broadcast any RF energy that could intefer with other systems.  The
ferrite beads sound like the solution I am looking for.  Thanks again for
the help!

                                                             Rod

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspamspamBeGonemitvma.mit.edu


2002\01\19@032736 by Henk Smit

flavicon
face

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



'[PIC]:'
2002\03\28@082454 by PY2NI
flavicon
face
   Hi fellows!

   I downloaded PICUART.ZIP, and probably, made the changes to work with
16F628. As far as I remember I striped all PORTX (for x = C,D AND E) , PIR2
, CCP2IE, PIE2 instructions, changed ADCON1 for CMCON (just to shut down the
comparators).
   PORTB is programed like this:

   movlw     b '00001111'
   movwf    TRISB

   Then I wired a GPS (4800, 8 bits, no parity, 1 stop bit) to the RX and
all I have is a string of  b '00000001' coming out of RB3.
   The baud rates are ok ( measured in a osciloscope).

   Did anybody find any result like this with F628? Am'I missing something?
any gotcha?

P.S the GPS is sending NMEA sentences @4800,8N1 for sure.



Happy EASTER to everyone


Horta

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\03\28@121001 by Olin Lathrop

face picon face
>     Then I wired a GPS (4800, 8 bits, no parity, 1 stop bit) to the RX and
> all I have is a string of  b '00000001' coming out of RB3.
>     The baud rates are ok ( measured in a osciloscope).
>
>     Did anybody find any result like this with F628? Am'I missing
something?
> any gotcha?
>
> P.S the GPS is sending NMEA sentences @4800,8N1 for sure.

Is the GPS sending real RS-232 or TTL-level with RS-232 protocol.  The PIC
does the latter and won't work or get fried by the former.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, TakeThisOuTolinspamTakeThisOuTembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\03\29@085815 by PY2NI

flavicon
face
   Hi Olin, signal is TTL and I fixed the bug, it's runing ok on a 628 and
877 too. Let me see what is getting on  hiperterminal, I have a led blinking
every '$' caracter received and it seens to be a bit weird. Thanks anyway
for your answer.


Regards
Horta

{Original Message removed}


'[pic]:'
2002\05\08@051533 by Rod Phillips
picon face
part 1 440 bytes content-type:text/plain; (decoded 7bit)

Hello to all,

I have been trying to use a TI  TPIC6B595 power shift register without
success.  I have attatched the C source code that I wrote to see what I am
overlooking.  In writing the code I used the data sheet along with an App.
note showing the control pin waveforms to transfer data.  I know that it
must be something simple but I can't find it.  The code is for CCS.


Thanks for your help
Rod


part 2 1788 bytes content-type:application/octet-stream; (decode)

part 3 144 bytes
--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\05\14@041646 by Richard Crossley

flavicon
face

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



'[PIC]:'
2002\07\21@175649 by Jai Dhar
flavicon
face
HI,

I'm trying to code and make my own pic programmer for a 16f84. As a very simple starting point, I thought I would just try and write any command and read it back to verify it. So I follow this procedure:

output 6 bits of 0x2 - 00 0010 (load program data)
output a start bit - 0
output 14 bits of any command
output a stop bit
output 6 bits of 0x8 - 00 1000 (cycle program command)
output 6 bits of 0x4 - 00 0010 (read program data command)

After I issue the last command, I cycle the clock 16 times and monitor RB7 for voltage changes, and I do'nt get anything. I know I'm sending/clocking RB6 and RB7 correctly because I have led's hooked up. What am I doing wrong?

Thank you

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\07\21@201616 by Byron A Jeff

face picon face
On Sun, Jul 21, 2002 at 05:45:27PM -0400, Jai Dhar wrote:
> HI,
>
> I'm trying to code and make my own pic programmer for a 16f84.

Three quick comments/questions:

1) Is this a learning project or are you building a programmer in prep for
doing PIC development. If it's the latter then your time is probably better
spent building/using on of the many programmers and software that's available.

2) What is your hardware for programming. The algorithm may not be relevant
if the hardware for programming is incorrect.

3) (The usual for me) Have you heard of the 16F628. It's like a 16F84 but only
much, much better and much, much cheaper. And it can even help you right where
you are because the programmer for it can be simplified vs. a 16F84 programmer.

My programmer and comparison pages can be found here:

http://www.finitesite.com/d3jsys
http://www.finitesite.com/d3jsys/16F628.html

> As a very simple starting point, I thought I would just try and write any
>command and read it back to verify it. So I follow this procedure:
>
> output 6 bits of 0x2 - 00 0010 (load program data)
> output a start bit - 0
> output 14 bits of any command
> output a stop bit
> output 6 bits of 0x8 - 00 1000 (cycle program command)
> output 6 bits of 0x4 - 00 0010 (read program data command)

How long did you wait between the program command and the read program data?
For the 16F84 you must wait at least 10ms after the beginning of a write
before you can read.

If possible slow the programming down so that you can see the state of each
bit as it's transmitted. If possible separate the input into RB7/DATA from
the output from RB7/DATA with a switch so that you can ensure that the output
driver comes on when you issue the read.

Are you sure that you are clocking on the correct edge?

There are a lot of issues when first bootstrapping your programming algorithm.

And as I said before if it's for a learning exercise the great! However if you
just want to get the job done, it's probably better to use someone else's
software.

>
> After I issue the last command, I cycle the clock 16 times and monitor RB7
> for voltage changes, and I do'nt get anything. I know I'm sending/clocking
> RB6 and RB7 correctly because I have led's hooked up. What am I doing wrong?

Not enough information to determine yet. One last question: are you hooking
up the LED directly to the RB6/RB7 lines or do you have a buffer between the
I/O lines and the LEDs. Because if you have the LED hooked up directly it's
quite possible that they are screwing up your data to and from the PIC.

Hope this helps,

BAJ

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\07\21@205642 by Jai Dhar

flavicon
face
This is purely for learning and my own development. Now, I know that I have
sufficient time between each pulse since I have it clocking on 1 second
intervals. I am using a 16f84 connected to D0 and D1 of a parport. I manually
step up the MCLR voltage to +12V before I start programming. I have also
monitored every D0/D1 pulse to make sure they coincide with the correct
instructions, and they do. So I must be sending out the wrong instructions in
the wrong order or something, which is why I wish to know the correct process.
I have two leds that connect from D0->GND and from D1->GND. No buffers
involved. I will try removing the led's tho and see what happens. Can you help
me any further?
> On Sun, Jul 21, 2002 at 05:45:27PM -0400, Jai Dhar wrote:
> > HI,
> >
> > I'm trying to code and make my own pic programmer for a 16f84.
>
> Three quick comments/questions:
>
> 1) Is this a learning project or are you building a programmer in prep for
> doing PIC development. If it's the latter then your time is probably better
> spent building/using on of the many programmers and software that's
available.
>
> 2) What is your hardware for programming. The algorithm may not be relevant
> if the hardware for programming is incorrect.
>
> 3) (The usual for me) Have you heard of the 16F628. It's like a 16F84 but
only
> much, much better and much, much cheaper. And it can even help you right
where
> you are because the programmer for it can be simplified vs. a 16F84
programmer.
{Quote hidden}

algorithm.
>
> And as I said before if it's for a learning exercise the great! However if
you
> just want to get the job done, it's probably better to use someone else's
> software.
>
> >
> > After I issue the last command, I cycle the clock 16 times and monitor RB7
> > for voltage changes, and I do'nt get anything. I know I'm sending/clocking
> > RB6 and RB7 correctly because I have led's hooked up. What am I doing
wrong?
{Quote hidden}

---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\07\21@213040 by Byron A Jeff

face picon face
On Mon, Jul 22, 2002 at 01:01:26AM +0000, Jai Dhar wrote:
> This is purely for learning and my own development.

Cool. Just wanted to make sure that your time wouldn't be better spent in
other phases of development.

>Now, I know that I have
> sufficient time between each pulse since I have it clocking on 1 second
> intervals.

OK.

> I am using a 16f84 connected to D0 and D1 of a parport. I manually
> step up the MCLR voltage to +12V before I start programming. I have also
> monitored every D0/D1 pulse to make sure they coincide with the correct
> instructions, and they do. So I must be sending out the wrong instructions in
> the wrong order or something, which is why I wish to know the correct process.
> I have two leds that connect from D0->GND and from D1->GND. No buffers
> involved. I will try removing the led's tho and see what happens. Can you help
> me any further?

The LEDs will kill the process because they will consume all of the available
current from the parallel port. Also you're missing another critical aspect
which is that the RB7/DATA pin from the PIC is both an input and an output
during the programming process. If you tie a parallel port output directly to
pin RB7 then you'll get two very bad effects: You won't be able to read the
RB7 output and you'll burn out the buffers on both the PIC and the parallel
port.

There's a third issue in the mix: The voltage that your parallel port outputs.
If it's anything close to a modern port then it's very likely that their high
output is only 3.3V. This is something that you need to check with a voltmeter
before proceeding. PIC's will not accept this as a high voltage. So you'll
need a buffer.

That's why I asked about the hardware. It's important. And right now I think
that your belief that the algorithm somehow is causing the problem is
misplaced.

Go and take a read of my TLVP pages. It discusses all of these issues and how
to solve them. http://www.finitesite.com/d3jsys

I hope you haven't burned out your parallel port in your process of discovery.

BAJ

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\07\21@214526 by Jai Dhar

flavicon
face
ok, so to clear up what your saying, I should insert a buffer between the data
lines and the parport so I basically disconnect the RB7 input from the parport
when I want to read it, and to protect both of them? As of now, I was simply
removing the D1 line from the parport to RB7 when I wished to read.. but a
buffer would serve the purpose also, correct? And then, just to make sure my
algorithm IS correct:
Load program data (6 bits for command and 16 for actual data)
Begin program/erase cycle command
Read command

That should get a successful write/read? Appreciate your help, thank you.

{Quote hidden}

in
> > the wrong order or something, which is why I wish to know the correct
process.
> > I have two leds that connect from D0->GND and from D1->GND. No buffers
> > involved. I will try removing the led's tho and see what happens. Can you
help
{Quote hidden}

outputs.
> If it's anything close to a modern port then it's very likely that their high
> output is only 3.3V. This is something that you need to check with a
voltmeter
{Quote hidden}

discovery.
{Quote hidden}

for
> > > doing PIC development. If it's the latter then your time is probably
better
> > > spent building/using on of the many programmers and software that's
> > available.
> > >
> > > 2) What is your hardware for programming. The algorithm may not be
relevant
{Quote hidden}

any
> > > >command and read it back to verify it. So I follow this procedure:
> > > >
> > > > output 6 bits of 0x2 - 00 0010 (load program data)
> > > > output a start bit - 0
> > > > output 14 bits of any command
> > > > output a stop bit
> > > > output 6 bits of 0x8 - 00 1000 (cycle program command)
> > > > output 6 bits of 0x4 - 00 0010 (read program data command)
> > >
> > > How long did you wait between the program command and the read program
data?
> > > For the 16F84 you must wait at least 10ms after the beginning of a write
> > > before you can read.
> > >
> > > If possible slow the programming down so that you can see the state of
each
> > > bit as it's transmitted. If possible separate the input into RB7/DATA
from
> > > the output from RB7/DATA with a switch so that you can ensure that the
output
> > > driver comes on when you issue the read.
> > >
> > > Are you sure that you are clocking on the correct edge?
> > >
> > > There are a lot of issues when first bootstrapping your programming
> > algorithm.
> > >
> > > And as I said before if it's for a learning exercise the great! However
if
> > you
> > > just want to get the job done, it's probably better to use someone else's
> > > software.
> > >
> > > >
> > > > After I issue the last command, I cycle the clock 16 times and monitor
RB7
> > > > for voltage changes, and I do'nt get anything. I know I'm
sending/clocking
> > > > RB6 and RB7 correctly because I have led's hooked up. What am I doing
> > wrong?
> > >
> > > Not enough information to determine yet. One last question: are you
hooking
> > > up the LED directly to the RB6/RB7 lines or do you have a buffer between
the
> > > I/O lines and the LEDs. Because if you have the LED hooked up directly
it's
{Quote hidden}

---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\07\22@001923 by Byron A Jeff

face picon face
On Mon, Jul 22, 2002 at 01:50:22AM +0000, Jai Dhar wrote:
> ok, so to clear up what your saying, I should insert a buffer between the data
> lines and the parport so I basically disconnect the RB7 input from the parport
> when I want to read it, and to protect both of them?

Yes and as a level shifter because the parpart is probably outputting 3.3V for
high instead of the 4.0-5.0V that the PIC requires.

> As of now, I was simply
> removing the D1 line from the parport to RB7 when I wished to read..

I'm not sure you can do it fast enough. I believe that D7 becomes an output
after the 6th clock.

> but a
> buffer would serve the purpose also, correct? And then, just to make sure my
> algorithm IS correct:
> Load program data (6 bits for command and 16 for actual data)
> Begin program/erase cycle command
> Read command

You have to load the address first.

>
> That should get a successful write/read? Appreciate your help, thank you.

Why not simply take a look at the programming algorithm implemented in
lowlvl.c of my version of the picprg software off my page. It works fine
for 16F84s, 16F628s, and 16F87X parts.

BAJ

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\07\22@024751 by uter van ooijen & floortje hanneman

picon face
Are you outputting in the correct order (lowest bit first) and changing on
the correct clock (I thing the PIC latches on falling), and did you put the
PIC in program mode (MCLR rise fast enough).

Wouter van Ooijen
--
Van Ooijen Technische Informatica: http://www.voti.nl
Jal compiler, Wisp programmer, WLoader bootloader, PICs kopen


{Original Message removed}

2002\07\22@025423 by uter van ooijen & floortje hanneman

picon face
> intervals. I am using a 16f84 connected to D0 and D1 of a parport. I
manually
> step up the MCLR voltage to +12V before I start programming. I have also

From 0 or from Vcc?

Wouter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\07\22@071157 by Jai Dhar

flavicon
face
I change the RB7 pin on the rising edge, and hold it while it transitions to the lowest edge. This ensures that it gets latched on the lowest edge. And yes, I am outputting Lsb first. Also, I raise MCLR from 0 -> 12V via a switch on my PSU, so that seems to be fast enough, doesn't it? And I will try taking a look at your code for the algorithm. Thank you


Jai


On Sun, Jul 21, 2002 at 07:30:25PM +0200, wouter van ooijen & floortje hanneman wrote:
> Are you outputting in the correct order (lowest bit first) and changing on
> the correct clock (I thing the PIC latches on falling), and did you put the
> PIC in program mode (MCLR rise fast enough).
>
> Wouter van Ooijen
> --
> Van Ooijen Technische Informatica: http://www.voti.nl
> Jal compiler, Wisp programmer, WLoader bootloader, PICs kopen
>
>
> {Original Message removed}

2002\07\22@073029 by uter van ooijen & floortje hanneman

picon face
> I change the RB7 pin on the rising edge
> (snip)

Succes.
I am trying to program an 18F, so far I can read and write (singel panel
only) to code and configuration memory, but I can not get the chip to do an
erase.

Wouter van Ooijen
--
Van Ooijen Technische Informatica: http://www.voti.nl
Jal compiler, Wisp programmer, WLoader bootloader, PICs kopen

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics



'[PIC]:'
2002\09\15@085911 by ~ m A Y O ~
picon face
How to setup a PIC16F877 for a lamp control circuit using PWM. whilst synchronously trying to count the LCD and seven seg to count up and down (0-9, 9-0).In exact words , when the switch is pressed the light must get brighter. when the switch is OFFed the light should get dimmer. thanx


 


Join the world s largest e-mail service with MSN Hotmail. Click Here
-- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics


'[PIC]:'
2002\10\03@040813 by Michael Simpson
picon face
I just got an ICD2.   So far it has not been going to well.   After trying for over 5 hours to get the darn thing to work I managed to get a debug program loaded.  The actual load into a 18F452 took over 20 minutes.

For some reason now its in some sort of loop and Im gunna have to pull the plug.


I should have learned my lesson with the pic start plus.

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu



'[PIC]:'
2002\12\08@234906 by kirby warkentin
flavicon
face
[PIC]:
I am using the pic16f876 to save bytes to the microchip 25xx80. Whenever I
try to save and retrieve any letter further down the alphabet than P, when
i
retrieve it the data is changed. For example, when saving the letter W ,
when it is retrieved it seems to be saved as the letter G.  I am using
MPLAB
and printing out the byte to an LCD. I get the same results whether I try
saving the letters using binary or hex coding. For some reason the letters
A
through P work fine.
Whats going on ?

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\12\08@235825 by kirby warkentin

flavicon
face
[PIC]:
 I am using the pic16f876 to save bytes to the microchip 5xx80. Whenever I
 try to save and retrieve any letter further down the alphabet than P, when
i  retrieve it the data is changed. For example, when saving he letter W ,
 when it is retrieved it seems to be saved as the letter G.  I am using
MPLAB
 and printing out the byte to an LCD. I get the same results whether I try
 saving the letters using binary or hex coding. For some reason the letters
A  through O work fine.
 Whats going on ?

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\12\08@235834 by Peter Homann

flavicon
face
It's a bit hard with the limited info, but I'll give it ago.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
a b c d e f g h i j  k  l  m  n  o  p
q r s t u v w x y z

           ^
           |


Letters a - p are the 1st 16 letters of the alphabet.

w is the 23rd letter. 23 -16 is 7. the 7th letter is G

Goes the 25xx80 have 16 byte pages by any chance? if so your not
incrementing the page address.


Cheers,

Peter Homann
spamPeter.Homann@spam@spamadacel.com
Adacel Technologies Limited,
250 Bay St, BRIGHTON, 3186, AUSTRALIA
http://www.adacel.com <http://www.adacel.com>
Telephone +61 (3) 8530 7777, Facsimile +61 (3) 9596 2960
Mobile 0421-601 665


{Original Message removed}

2002\12\09@001913 by Peter Homann

flavicon
face
I've checked the datasheet. The pages are 16 bytes in size. I'd definitely
bet that you are not incrementing the page address after writing  the data,
or maybe when reading the data, or both.


Peter Homann
spam_OUTPeter.HomannTakeThisOuTspamKILLspamadacel.com
Adacel Technologies Limited,
250 Bay St, BRIGHTON, 3186, AUSTRALIA
http://www.adacel.com <http://www.adacel.com>
Telephone +61 (3) 8530 7777, Facsimile +61 (3) 9596 2960
Mobile 0421-601 665


{Original Message removed}

2002\12\09@230843 by kirby warkentin

flavicon
face
Peter :

You were right about incrementing the page adress. Thanks. however, if I
write the letter "W"  to any address location and retrieve it , it comes
back out as the letter "G". I have noticed that any letter saved into the
memory higher than the letter "P" is retrieved from the memory as the letter
that corresponds to one which has a binary representation that is the same
as the 4 least significant bits. For example----W is saved as G and   T is
saved as D

"W"  is binary 0101 0111                   "T"  is binary 0101 0100
"G"   is binary 0100 0111                   "D"  is binary 0100 0100

The Lcd interface works fine. If I simply send a binary code to the Lcd to
say "W" or "T" it works fine. But not when I retrieve the binary saved code
from memory. The program so write to the EEprom seems fine as well.
I'm puzzled ?

----- Original Message -----
From: "Peter Homann" <RemoveMEpeter.homann@spam@spamspamADACEL.COM>
To: <RemoveMEPICLISTRemoveMEspamTakeThisOuTMITVMA.MIT.EDU>
Sent: Sunday, December 08, 2002 11:56 PM
Subject: Re: [PIC]:


{Quote hidden}

> {Original Message removed}

2002\12\21@015935 by Michael Simpson

picon face
I have been using PIC chips for a while and it seems that every time I use the VRef option when working with AtoD ports on the mid and high end chips I cant get the readings to settle down.  I get a rough range of +-5 on my readings.   I I tie the Vref to VCC or disable this option it works ok.


Is there any hard and fast rules for using this option.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservTakeThisOuTspamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body

2002\12\21@085928 by Andy Kunz

flavicon
face
What size pot?  You need to meet the impedance requirements.  You also
should have a big cap on it, especially with newer chips I've found.

Andy

At 01:57 AM 12/21/02 -0500, you wrote:
{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservspamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body

2002\12\23@111723 by llile

flavicon
face
1. You may have noise on your reference voltage.  What voltage are you
powering your Vref with?

2. You should never trust an analog reading as far as you can throw it.
Use some kind of software filtering like median filtering especially if
the result needs to be precise.




-- Lawrence Lile





Andy Kunz <.....montanaTakeThisOuTspamEraseMEFAST.NET>
Sent by: pic microcontroller discussion list <RemoveMEPICLISTspamspamKILLspamMITVMA.MIT.EDU>
12/21/02 07:58 AM
Please respond to pic microcontroller discussion list


       To:     STOPspamPICLISTEraseMEspamMITVMA.MIT.EDU
       cc:
       Subject:        Re: [PIC]:


What size pot?  You need to meet the impedance requirements.  You also
should have a big cap on it, especially with newer chips I've found.

Andy

At 01:57 AM 12/21/02 -0500, you wrote:
>I have been using PIC chips for a while and it seems that every time I
use
>the VRef option when working with AtoD ports on the mid and high end
chips I
>cant get the readings to settle down.  I get a rough range of +-5 on my
>readings.   I I tie the Vref to VCC or disable this option it works ok.
>
>
>Is there any hard and fast rules for using this option.
>
>--
>http://www.piclist.com#nomail Going offline? Don't AutoReply us!
>email listservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listserv@spam@spammitvma.mit.edu with SET PICList DIGEST in the body

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\25@100645 by Chris Loiacono

flavicon
face
If you typically have your board powered put your Vcc supply on a bitscope
or a faster analyzer and watch for glitches. there's at least a 50% chance
that they are many if you don't do this sort of checking on your finished
designs. Some of the most seemingly rock-solid micro-controlled designs are
just full of this kind of noise - occurrences are so brief that many bench
scopes are unable to show them to you.

In one design, the hits were coming from 480V thru the supply transformer.
It was impossible to completely eliminate them by decoupling, etc. I used an
off-chip ADC which from a hardware perspective was much more robust. This
cured 99% of what you are describing.

Of course, the comment about impedence is valid and may preclude all this.
It's one thing in the Mchip manual that was worth reading about....Sorry
Lawrence, I hate to disagree, but ADC readings are super trustworthy, even
the slow, simple PIC ADC's - just as long as one accepts and understands
it's limitations. Some of our PIC ADC designs close some pretty high power
control loops and need to be more than 99.9% reliable. In the 480V design I
mentioned, any wackiness in ADC reads would take out power distribution
transformers. I mention this not to boast, because it took much more effort
than I would have liked, but to make the point that it can be done reliably
with the right technique.

Chris

BTW, Lawrence, my wife purchased a new Salton toaster-oven - big, expensive,
ugly and archaic controls - what a piece of junk....Why dont they let you
design one with a PIC temp control & timer?

CL


{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2002\12\29@141144 by Michael Simpson

picon face
I have tried several size pots from 1k to 100k.   The results are all the
same.  Even digital pots
----- Original Message -----
From: "Andy Kunz" <spam_OUTmontanaspamspamFAST.NET>
To: <PICLISTspam_OUTspamRemoveMEMITVMA.MIT.EDU>
Sent: Saturday, December 21, 2002 8:58 AM
Subject: Re: [PIC]:


> What size pot?  You need to meet the impedance requirements.  You also
> should have a big cap on it, especially with newer chips I've found.
>
> Andy
>
> At 01:57 AM 12/21/02 -0500, you wrote:
> >I have been using PIC chips for a while and it seems that every time I
use
> >the VRef option when working with AtoD ports on the mid and high end
chips I
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2002\12\29@141613 by Michael Simpson

picon face
I have tried using a zener off my VCC.  I also used an adjustable power
supply (external from VCC).  The main thing I'm trying to do is get full
range (10) bit on a 1.7v reading.  However Its so jumpy its not worth the
effort.

As far as your Item 2 is concerned I have to disagree.  When using the
internal ref. and properly set up clock I can get rock solid readings from
the AtoD.

{Original Message removed}


'[PIC]:'
2003\05\07@114830 by eger Stefan Georg
flavicon
face
I want do measure the rpm´s from a electro motor, and I get a pulse signal
from an encoder. Now I´ve decided to count the pulses with the Timer T1. I
know 200 pulses are equal to one rotation. The problem I have now, is to
measure how many pulses I receive in one second, so that I can calculate the
rpm(rotations per minute). Can anyone say me, how can I do this the best
way, or exists another possibility to measure the rpm?

Mfg
Stefan

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\05\07@121558 by Tal

flavicon
face
As you mentioned, one way is to count the pulses within a fixed time
period. The other is to measure the time it take to receive a fixed
number of pulses. The coice between the two depends on the accuracy and
the sample rate you need.

As for time measuring, you want to use additional timer that runs on a
fixed clock (you can use the PIC clock with the proper internal division
to get the desired time clock).

Now that you have two timers, one for the pulses and one for the time,
start both of them, enter a loop and wait until the 'fixed' count timer
(depending on which of the two options above you choose) get to its end
or predefined value and than ready the other one and do the proper math.

BTW, and I don't know if this is the case, if you need a timer with more
bits than the hardware provides, you can extend it in software, that is,
have an additional variable in memory and each time the timer warps,
increment the memory variable.
Also, I assume that the pulses from the encoder are at equal angular
intervals. If not, you want to count a multiple of 200 pulses (that is,
complete revolutions). Otherwise, it does not matter.

Hope this helps,

Tal

> {Original Message removed}

2003\05\07@122642 by Dave VanHorn

flavicon
face
At 09:15 AM 5/7/2003 -0700, Tal wrote:
>As you mentioned, one way is to count the pulses within a fixed time
>period. The other is to measure the time it take to receive a fixed
>number of pulses.

The time between two pulses, plus the width of the pulses, is all you need.
You know the number of pulses in a revolution.
1 rpm would give you a period of 60/N seconds, where N is the number of
pulses in a rev.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


'[PIC]:'
2003\06\10@195732 by Dave Stowe
picon face
Just thought this might be of interest to someone. It a routine to read multiple 1 wire DS 18S20's and other 1-Wire on the same bus.


' One-wire multiple temperature sensors for upto 8 DS18S20 although this is not the limit.
' Tested on a PROTON Board with a PIC16F877 at 20 Mhz
' Can be adapted easily for any PIC and board. I use Port A.0 for the 1 wire
' Bus, and in this program I have already read the ID's with the REMARKED part of
' the program using a single device routine.
' Conversion time is 750ms per device as laid out in 1 wire specs, although you can
' test for end of conversion if speed is paramount. 5 volts must be sent also to power ' the devices when conversion is taking place, uses 1.5ma in conversion. Can be a permanent supply.
' Three wires needed, GND, Data, +5Volts. This is supplied by the PIC on Pin A.1 when converting.
' Also needs a 4K7 pull-up resistor between DQ and 5volts at pic input pin.
' I also have an IBUTTON ports to read DS1990's on the same cable, used for alarm setting and door access.
' PROTON BASIC PLUS used as its the best around.
' Any comments welcomed.
' KILLspamdave.stowespam_OUTspamspam_OUTntlworld.com
' Copyright Dave Stowe, June 2003

 Include "PROTON_20.INC"         ' Standard include for for 20 Mhz PIC 16F877
         'Temperature Variables
 Dim Temperature     as Word   ' Temperature storage
 Dim Count_remain     as  Byte   ' Count remaining
 Dim Count_per_c     as Byte   ' Count per degree C
       Dim Dum       as  Byte   ' Dummy variable to pad OWIN
   'Store Variables
 Dim Rom[8]      As   Byte   ' Storage for the Device ID
 Dim Pointer      as   Byte   ' Used in storing and retrieving the ID
 Dim Memloc       as   Word   ' Where the data is held
 Dim Loop      As   Byte   ' Used in getting data into Rom String
   'For Displaying the Data
 Dim Sensor       As   Byte   ' General loop counter for amount of sensors
   ' 1 Wire Bus pin assignment
 Symbol DQ = PORTA.0       ' One-wire data pin
   Main:                 ' Main program starts here   Delayms 500         ' Wait for PICmicro to stabilise
       Cls           ' Clear the LCD
   ' This bit when un-REMed will read Out the ROM ID's to the LCD for adding to the CDATA below
 ' Must be only 1 device on the port at a time when reading ID's
 'OWRITE DQ, 1, [$33]
 'OREAD  DQ ,0, [STR Rom\8]
 'PRINT HEX2 ROM[0],HEX2 ROM[1],HEX2 rom[2], HEX2 ROM[3], HEX2 ROM[4], HEX2 ROM[5], HEX2 ROM[6], HEX2 ROM[7]
 'DELAYMS 15000
 'CLS
 'GOTO Main
Sensors:
 For Sensor = 0 to 2       ' Loop round the Sensors
  Gosub GetSensor       ' Get the Sensor Data
  Gosub Calculate       ' Work out the temperature
      ' A little line to display the Data, do all the work with the data in here
  Print At 1, 1, "Sensor ",Dec Sensor + 1," = ",DEC (Temperature / 100), ".", DEC2 Temperature
  DelayMs 250               ' A small delay so we can see the Temp
 Next          ' and the next one please !
 GoTo Sensors        ' Do it forever

Calculate:
    ' Calculate temperature in degrees C to 2 decimal places (not valid for negative temperature)
 OREAD DQ, 0, [Temperature.LOWBYTE, Temperature.HIGHBYTE, Dum,Dum,Dum,Dum, Count_remain, Count_per_c]
 Temperature = (((Temperature >> 1) * 100) - 25)   Temperature = Temperature + (((Count_per_c - Count_remain) * 100) / Count_per_c)
 Return      GetSensor:   ' Must have value of which sensor in Variable Sensor starting from 0
 Pointer = Sensor * 8 : MemLoc = SensorData + Pointer 'Point to the Rom Data
 For Loop = 0 to 7
     Rom[Loop] = CREAD MemLoc + Loop         ' Get the Rom Data
 Next Loop
 High PortA.1                  ' Put 5 volt on power pins
 OWRITE DQ, 1, [$55,STR Rom,$44]        ' Send Match Rom, Rom ID and get temp command
 DelayMs 750                ' Wait for conversion
 OWRITE DQ, 1, [$55,STR Rom,$BE]       ' Send Match Rom, Rom ID and read the temperature
 LOW PortA.1                    ' Turn off power
 Return
         SensorData:
     ' This is where we store the Rom ID's, must go in the program last
  ' This is laid out :-
  ' Family ID - 1 byte, Rom ID - 6 bytes, Checksum - 1 byte
  ' ROM ID is low byte first. As read by the routine above.
  CDATA $10,$8B,$D4,$43,$00,$08,$00,$B6
  CDATA $10,$61,$E6,$43,$00,$08,$00,$57
  CDATA $10,$F4,$AC,$43,$00,$08,$00,$59




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.486 / Virus Database: 284 - Release Date: 29/05/2003

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu>

2003\06\27@130917 by Jeremy Darling

flavicon
face
Hello all, I am new to the PIC's but have used some MCU's in the past.  I recently attended the PIC conference and was given a "Sample Kit" witch included a copy of MpLab, 12F926, and 16F676 PIC's.  When I got home I hit the net and downloaded everything I could find on these to see if I could program them (found lots of stuff including NoPPP and xcsb).  My question is has anyone come up with a programmer for these that you can build yourself.  I want to use the PIC's in some of the smaller robots that I work with for group functions but can't figure out how to program them.  I checked the FAQ against the 2 part numbers but nothing except a C compilier came up.  Sorry if this question has been answered before.

Jeremy Darling

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\06\27@180041 by

flavicon
face
There are many programmers, personaly I use the one
found on this page : http://www.voti.nl/pic/tools.html.

Jan-Erik.

{Original Message removed}


'[PIC]:'
2003\08\04@203147 by kirby warkentin
flavicon
face
How do you  convert a Hex file back into the MPLAB's assembly language. I've wriiten some routines and can't retrieve the .asm files.


--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspamspamspamBeGonemitvma.mit.edu


'[PIC]:'
2003\11\04@184736 by John Murray
picon face
In summary, I am looking for some help on interfacing to a PIC a
temperature sensor, i.e. 0.25 inch diameter thermistor or similar, that
will fit inside a thermowell immersed in a liquid.  I also posted this
under the EE topic.



My background is that I have worked with computers on and off for a
hobby since 1976, and I have dabbled in electronics.  I have a very
basic understanding of electronics from the dabbling and one year of
electronics in high school.  I have some some programming over the years
in Basic, Fortran, and Visual Basic.



I am building a home brewing system for beer and am trying to automate
some of the processes.  The two main stages of brewing involve making
the wort and fermenting.  The making of the wort involves several
stainless vessels that I want to install thermowells into, and a
temperature controller will be used to control heating of water and also
regulating several circulating pumps (on/off).  The fermenting stage
involves a stainless fermenter that I want to put a thermowell into to
control the turning on and off of a refrigerator.



I bought an Invensys Ranco ETC temperature controller.  It uses a
resistive element 0.25 inches in diameter that will fit into the
thermowells.  Ranco supplies a temperature vs. resistance curve for the
sensor.  The values range above 300,000 ohms for temps below freezing,
approximately 139,000 ohms at 20 degF, 104,000 at 30 degF, 78,000 at 40
degF, 60,000 at 50 degF, 46,000 at 60 degF, 36,000 at 70 degF, 28,000 at
80 degF, all the way down to 1,500 ohms at 230 degF.  Ranco claims to be
about +/- 1 degF on accuracy.



The temp vs resistance curve is very nonlinear.  I was able to fit it
very well with a 13th order Chebeshev polynomial, and have the Excel
output in ohms per degF.  Near the lower temperature ranges I'm
interested in, the change in resistance per degF is approximately 2,500
ohms per degF - the middle range is approx. 1,000 ohms per degF, and at
the upper range, it is approx. 25-75 ohms per degF.



The Ranco controller is too simple and can't perform all that I need it
to do.  I want to build a couple of temp controllers - one for the wort
making, i.e., the hot end, and one for the fermenting, i.e., the cold
end.  I think that will make the problem easier since splitting into two
(or three) controllers will allow splitting the curve into several
pieces and make the difference in resistance smaller for the temperature
range to be controlled.  I am curious how Ranco can get their controller
to work over such a wide temp range, though.  My preference would be to
use the same logic, hardware, etc for both controllers if they could
work over the whole range.



I need help in figuring out how to read the resistances from the Ranco
sensor and convert the readings into temperatures.  I have the table and
understand at least one way to convert a resistance value into
temperatures.  What I don't understand is how to either use the A/D pins
on a PIC to read the resistance, or how to interface an external A/D
converter.  The resistance range is so large.  It seems like even a 10
bit A/D can't handle the precision necessary to distinguish between one
degF, especially at the high temp part of the curve where the difference
is 25 ohms or so per degF.  I don't know how Ranco does it, but
evidently by the fact they have many of these out in use, it must be
possible.



Help!!



Thanks,

John Murray

Houston, TX






--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\11\04@200324 by Tony Nixon

flavicon
picon face
John Murray wrote:
>
> In summary, I am looking for some help on interfacing to a PIC a
> temperature sensor, i.e. 0.25 inch diameter thermistor or similar, that
> will fit inside a thermowell immersed in a liquid.  I also posted this
> under the EE topic.


Why not use one of the Dallas digital 3 pin temp sensors?

Tony

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\11\05@081805 by Mohit Mahajan

flavicon
face
Hi John,

As your sensor try LM335 (-25C to 100C). Its cheap, should fit inside
the thermowell and very easy to read from (works like a zener with
10mV/K rise, linear). They should have a Fahrenheit version. Its easy to
couple with a PIC. And since you are working with beer, -25 to 100C
should be enough (or am I wrong?).

A 10 bit ADC will have 1024 levels (0x00-0xFF)... for the sake of
convenience lets say it has 1000 levels. So if you are working in 0-100C
range, you can represent 00.0 to 99.9C using 10 bits. This is the
resolution; precision/repeatability/accuracy etc. are dependent on the
LM335 & PIC's ADC. But +/- 0.5C precision(?) is possible.

Use an Op-Amp circuit to amplify LM335's output across 0-5V range and
input this into a PIC's ADC (you can use PIC16F877 which has an 8
channel ADC). The datasheet should tell you how to. Program the PIC to
compare this to your set values and accordingly drive the optos. If you
need more than 8-channels, then go for a separate ADC chip hooked to a
PIC. In which case you could go for a smaller non-ADC PIC. Finally,
assuming you don't need to attach an LCD/LED, keypad, etc. you have all
the rest of the i/o pins as outputs for driving optos.

Another bit of advice from me who was (and still is, in some ways) an EE
novice... get yourself this book: The Art of Electronics - Paul
Horowitz. It’s a big help.

Hope this helps,
Mohit.



{Original Message removed}

2003\11\05@084540 by Mohit Mahajan

flavicon
face
> A 10 bit ADC will have 1024 levels (0x00-0xFF)...
Please read that as 0x00-0x3FF. Sorry.

-----Original Message-----
From: pic microcontroller discussion list
[@spam@PICLISTspamspamspam_OUTMITVMA.MIT.EDU] On Behalf Of Mohit Mahajan
Sent: Wednesday, November 05, 2003 6:36 PM
To: KILLspamPICLISTspamKILLspamMITVMA.MIT.EDU
Subject: Re: [PIC]:


Hi John,

As your sensor try LM335 (-25C to 100C). Its cheap, should fit inside
the thermowell and very easy to read from (works like a zener with
10mV/K rise, linear). They should have a Fahrenheit version. Its easy to
couple with a PIC. And since you are working with beer, -25 to 100C
should be enough (or am I wrong?).

A 10 bit ADC will have 1024 levels (0x00-0xFF)... for the sake of
convenience lets say it has 1000 levels. So if you are working in 0-100C
range, you can represent 00.0 to 99.9C using 10 bits. This is the
resolution; precision/repeatability/accuracy etc. are dependent on the
LM335 & PIC's ADC. But +/- 0.5C precision(?) is possible.

Use an Op-Amp circuit to amplify LM335's output across 0-5V range and
input this into a PIC's ADC (you can use PIC16F877 which has an 8
channel ADC). The datasheet should tell you how to. Program the PIC to
compare this to your set values and accordingly drive the optos. If you
need more than 8-channels, then go for a separate ADC chip hooked to a
PIC. In which case you could go for a smaller non-ADC PIC. Finally,
assuming you don't need to attach an LCD/LED, keypad, etc. you have all
the rest of the i/o pins as outputs for driving optos.

Another bit of advice from me who was (and still is, in some ways) an EE
novice... get yourself this book: The Art of Electronics - Paul
Horowitz. It’s a big help.

Hope this helps,
Mohit.



-----Original Message-----
From: pic microcontroller discussion list
[KILLspamPICLISTspamspamspamMITVMA.MIT.EDU] On Behalf Of John Murray
Sent: Wednesday, November 05, 2003 5:13 AM
To: PICLISTKILLspamspam.....MITVMA.MIT.EDU
Subject: [PIC]:


In summary, I am looking for some help on interfacing to a PIC a
temperature sensor, i.e. 0.25 inch diameter thermistor or similar, that
will fit inside a thermowell immersed in a liquid.  I also posted this
under the EE topic.



My background is that I have worked with computers on and off for a
hobby since 1976, and I have dabbled in electronics.  I have a very
basic understanding of electronics from the dabbling and one year of
electronics in high school.  I have some some programming over the years
in Basic, Fortran, and Visual Basic.



I am building a home brewing system for beer and am trying to automate
some of the processes.  The two main stages of brewing involve making
the wort and fermenting.  The making of the wort involves several
stainless vessels that I want to install thermowells into, and a
temperature controller will be used to control heating of water and also
regulating several circulating pumps (on/off).  The fermenting stage
involves a stainless fermenter that I want to put a thermowell into to
control the turning on and off of a refrigerator.



I bought an Invensys Ranco ETC temperature controller.  It uses a
resistive element 0.25 inches in diameter that will fit into the
thermowells.  Ranco supplies a temperature vs. resistance curve for the
sensor.  The values range above 300,000 ohms for temps below freezing,
approximately 139,000 ohms at 20 degF, 104,000 at 30 degF, 78,000 at 40
degF, 60,000 at 50 degF, 46,000 at 60 degF, 36,000 at 70 degF, 28,000 at
80 degF, all the way down to 1,500 ohms at 230 degF.  Ranco claims to be
about +/- 1 degF on accuracy.



The temp vs resistance curve is very nonlinear.  I was able to fit it
very well with a 13th order Chebeshev polynomial, and have the Excel
output in ohms per degF.  Near the lower temperature ranges I'm
interested in, the change in resistance per degF is approximately 2,500
ohms per degF - the middle range is approx. 1,000 ohms per degF, and at
the upper range, it is approx. 25-75 ohms per degF.



The Ranco controller is too simple and can't perform all that I need it
to do.  I want to build a couple of temp controllers - one for the wort
making, i.e., the hot end, and one for the fermenting, i.e., the cold
end.  I think that will make the problem easier since splitting into two
(or three) controllers will allow splitting the curve into several
pieces and make the difference in resistance smaller for the temperature
range to be controlled.  I am curious how Ranco can get their controller
to work over such a wide temp range, though.  My preference would be to
use the same logic, hardware, etc for both controllers if they could
work over the whole range.



I need help in figuring out how to read the resistances from the Ranco
sensor and convert the readings into temperatures.  I have the table and
understand at least one way to convert a resistance value into
temperatures.  What I don't understand is how to either use the A/D pins
on a PIC to read the resistance, or how to interface an external A/D
converter.  The resistance range is so large.  It seems like even a 10
bit A/D can't handle the precision necessary to distinguish between one
degF, especially at the high temp part of the curve where the difference
is 25 ohms or so per degF.  I don't know how Ranco does it, but
evidently by the fact they have many of these out in use, it must be
possible.



Help!!



Thanks,

John Murray

Houston, TX






--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\11\25@041840 by ant)

flavicon
face
Hi All,
I am new babe on PIC. I am trying do develop applications on PIC16F870
series. Please provide me some examples and good tutorials links to aid me.

Regards,
Satya Prakash Prasad.

-----------------------------------------
This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, retention, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.  Also, email is susceptible to data corruption, interception, tampering, unauthorized amendment and viruses. We only send and receive emails on the basis that we are not liable for any such corruption, interception, tampering, amendment or viruses or any consequence thereof.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\11\25@084834 by

picon face
Prasad, Satyaprakash wrote:

> Hi All,
> I am new babe on PIC. I am trying do develop applications on PIC16F870
> series. Please provide me some examples and good tutorials links to aid me.

Hi.
Well, this is a labyrinth with many entries, one
of them (which isn't a blind alley) is
http://www.voti.nl/swp/index.html.

Enjoy !

Regards
Jan-Erik.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\11\25@130246 by D. Yates

flavicon
face
When I was getting into microcontrollers a few months ago, one of the best resources I found was actually a commercial site set up with lots of tutorials.  If you like to learn by example, you might check it out:  http://www.sparkfun.com
Then click on the tutorials.  They have lengthy and very helpful set-
up tutorials for a few of the more common programmers and pics.  From what I can tell, its a couple of students from Colorado who run it, so they're probably in the same boat as most of us.

Also, the absolute BEST site for learning about PICS is of course microchip.com, and the first thing I'd do is get a copy of the reference manual for the chip you're working with.


----------
D. Yates
Vanderbilt University
piclistspamBeGonespamnerdulator.net


---{Original Message removed}


'[PIC]:'
2003\12\22@091359 by Herbert Graf
flavicon
face
> Hi ,
>
> Has any1 ever had  110592 Mhz problems with PIC 18F458 ?

       Huh? I think you're going to have to revise that question, unless of course
you are asking about running a PIC at 110GHz!! TTYL

----------------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


'[PIC]:'
2004\01\01@185608 by MSullivan
flavicon
face
testing, just subscribed to group, have a PIC18 project starting up..

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestRemoveMEspamKILLspammitvma.mit.edu


'[PIC]:'
2004\02\10@162927 by Jim Franklin
flavicon
face
part 1 2182 bytes content-type:text/plain; (decoded 7bit)

Hi
I have a little project on the go, I have built the prototype based on a
PIC16F877A with an LCD display amongst other things.

I am writing a menu system for the software and have a flexible design idea
but I am struggling with the C code. (I am a visual basic man - anyone
offering to write a compiler for the PIC?)

OK as brief as I can.

Top menu has menu number 00, 10, 20, 30 and going right from 30 goes to menu
00 and left from 00 goes to 30. (a cylindrical effect).
some menus go down, so 00 can go down to 01, and then down to 02. 01 goes
left to 83 (an action) and right to 84 (an action). get the drift?
I chose 8x for the actions so we can test bit 7. This limits us to 127
menus/submenus/actions.
FF indicates no action.
NOTE: Only left or right are used to run a process. and as we know all
processes when designing this, we can use a switch statement to call the
relevant process based on the number we grab from the table.

OK
I intend to store the configuration of the menu like this.
menu, Up, Dn, Rt, Lt    (current menu , up, down,right, left)
e.g  (all in hex .)
00 FF 01 10 30  <--- menu 00, no up,  dn=01, rt=10, lt=30
01 00 02 83 84  <--- menu 01, up=00, dn=02, rt=83, lt=84
02 01 03 FF 85  <--- menu 02, up=01, dn=03, rt=none, lt=85
and so on.
There will also be a menu string listing something like these with menu
number, text, 0x00 to terminate.
00 Main 00
01 Config 00
02 Setup 00
03 Schedule 00
04 .....
FF 00 00    <-- end of menu

(jpg image sort of detailing the menu)

I have written some pseudo code, and started the C, but I am struggling with
how to setup the data stuff.

Pseudo Code.
1. Set current menu=00
2. Load Menu data for current option (menu, up,dn,rt,lt)
3. Display menu text (name) and options for up, dn, rt, lt.
4. wait at step 4 until keypress (do interrupts as needed)
5. if option chosen is an FF function (none) goto 4.
6. if key=left or right and bit7 of option=1 call process listed
7. it wasn't an action, so get the new menu number and go to step no. 2


Any ideas.

--
http://www.piclist.com hint: To leave the PICList
TakeThisOuTpiclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu




part 2 14204 bytes content-type:image/jpeg; (decode)

2004\02\10@190709 by Ken Pergola

flavicon
face
Hi Jim,

Check out November 2003 issue of Circuit Cellar INK:

http://www.dtweed.com/circuitcellar/caj00160.htm

"Hierarchical Menus in Embedded Systems
What is the most efficient method for implementing menu structures in
embedded systems? Aubrey had been mulling over this question for several
months until he recently worked out a way to implement a hierarchical menu
system that allows you to reuse software for displaying and changing
parameters to save ROM space and achieve maximum flexibility.
Download: Kagan-160.zip"


Don't forget to thank Dave Tweed on this list for creating and maintaining
this index. :)


Best regards,

Ken Pergola

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspam_OUTspamspamBeGonemitvma.mit.edu

2004\02\10@225002 by Jim Franklin

flavicon
face
Ken,

Thanks for the reply, i notice you didn't offer to write the VB compiler for
it though :D

Looking at the listing from Dave Tweed, I'm going to have to buy a new C
compiler anyway.
I'm currently using the C2C compiler from Pavel, which although it's fairly
cheap, it is
also fairly limited.

Does anyone on the list recommend a "budget" C compiler - for a home
enthusiast budget that is..

Regards
Jim




{Original Message removed}

2004\02\10@230450 by Ken Pergola

flavicon
face
Hiya Jim,

I'm sorry, I did not mean to confuse anyone with my last message.

The article was written by Aubrey Kagan. I could be wrong, but I think
Aubrey wrote the code as well. I don't know for sure since I don't see his
name in the source file and I don't have that issue of Circuit Cellar in
front of me right now.

Dave Tweed does a great job of indexing all the Circuit Cellar articles.
Thanks to him, I was able to answer your post so quickly instead of
rummaging through my stack of Circuit Cellar articles -- thanks Dave!

Best regards,

Ken Pergola

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-request.....spam@spam@mitvma.mit.edu

2004\02\11@053908 by Roland

flavicon
face
Hi Jim

I'm new to the group, so not too sure of the history on this topic, but;

Have you looked at XCSB ?

Regards
Roland

At 01:06 AM 11/02/04 +0000, you wrote:
{Quote hidden}

>{Original Message removed}

2004\02\14@101406 by Dave Tweed

face
flavicon
face
Ken Pergola <@spam@no_spamspamspamLOCALNET.COM> wrote:
> Dave Tweed does a great job of indexing all the Circuit Cellar articles.
> Thanks to him, I was able to answer your post so quickly instead of
> rummaging through my stack of Circuit Cellar articles -- thanks Dave!

You're welcome!

I'm always gratified to hear that people find it useful -- I know I do!

-- Dave Tweed

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservspamBeGonespamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body

2004\02\14@101406 by Dave Tweed

face
flavicon
face
Ken Pergola <no_spamRemoveMEspamTakeThisOuTLOCALNET.COM> wrote:
> Dave Tweed does a great job of indexing all the Circuit Cellar articles.
> Thanks to him, I was able to answer your post so quickly instead of
> rummaging through my stack of Circuit Cellar articles -- thanks Dave!

You're welcome!

I'm always gratified to hear that people find it useful -- I know I do!

-- Dave Tweed

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body


'[PIC]:'
2004\05\24@191705 by Nikhil Praveen
flavicon
Hi everyone, has anyone tried building an EFI controller (to control fuel and/or ignition) for any car using any PIC chip?

___________________________________
Telecom disclaimer can be found at:
Http://http://www.telecomfiji.com.fj/disclaimer.htm

-------------------------------------------------------------------------
This e-mail message has been scanned and cleared by Trend Micro InterScan
-------------------------------------------------------------------------

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspamspammitvma.mit.edu with SET PICList DIGEST in the body

2004\05\24@194252 by Andrew Warren

flavicon
face
Nikhil Praveen <.....PICLIST@spam@spamspamBeGonemitvma.mit.edu> wrote:

> Hi everyone, has anyone tried building an EFI controller (to control
> fuel and/or ignition) for any car using any PIC chip?

   Fuel is difficult, although some of the newer PICs might be up to
   the task.  Most people use higher-powered microprocessors for
   fuel-injection management.

   Ignition is easier; PICs are in the ignition controllers from
   Crane Cams, Jacobs Electronics, and probably others.

   -Andy

=== Andrew Warren -- STOPspamaiwTakeThisOuTspamcypress.com
=== Principal Design Engineer
=== Cypress Semiconductor Corporation
===
=== Opinions expressed above do not
=== necessarily represent those of
=== Cypress Semiconductor Corporation

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistserv@spam@spammitvma.mit.edu with SET PICList DIGEST in the body

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