part 1 4035 bytes content-type:multipart/alternative; (decoded quoted-printable)
------
2001\02\08@145834
by
Bob Blick
> 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
2001\02\12@095001
by
Donald A.Poggemoeller
2001\02\13@111401
by
Donald A.Poggemoeller
2001\02\26@042805
by
Dhruba
|
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
2001\03\02@145210
by
Drew Vassallo
|
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-requestEraseME
@spam@mitvma.mit.edu
2001\03\02@155431
by
Dennis Oliver
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
2001\03\02@163322
by
Steven J. Devine
|
> >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 <RemoveMEddoliverEraseME
KILLspamDMCI.NET>
> >Reply-To: Dennis Oliver <spamBeGoneddoliverspam_OUT
RemoveMEdmci.net>
> >To: .....PICLIST
RemoveMEMITVMA.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)
steve
@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-requestRemoveME
STOPspammitvma.mit.edu
2001\03\27@042304
by
Jonathan Miller
2001\03\27@122852
by
Raymond Choat
2001\03\27@123801
by
D Lloyd
2001\03\27@140526
by
Bob Ammerman
2001\03\28@110907
by
EDU (1.8d)
> What prices?
Unknown command - "WHAT". Try HELP.
> ----- Original Message -----
Unknown command - "-----". Try HELP.
> From: "Jonathan Miller" <RemoveMEjonathan.millerspam
VIRGIN.NET>
Unknown command - "FROM:". Try HELP.
> To: <TakeThisOuTPICLISTspam
RemoveMEMITVMA.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_OUTPICLISTRemoveME
EraseMEMITVMA.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
'[PIC]:'
2001\04\05@152651
by
Gary Faria
2001\04\05@171551
by
Thomas C. Sefranek
2001\04\05@180629
by
Olin Lathrop
> 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, olinSTOPspam
KILLspamembedinc.com, http://www.embedinc.com
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listserv.....
spammitvma.mit.edu with SET PICList DIGEST in the body
2001\04\19@093229
by
sam woolf
2001\04\27@115439
by
Greg Yadzinski
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.....
cti1.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
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_OUT
mitvma.mit.edu with SET PICList DIGEST in the body
2001\04\30@153220
by
Quentin
|
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}>
> 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,
>
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistserv
TakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body
'[PIC]:'
2001\05\02@224942
by
Andrew Scott
|
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
2001\05\02@230757
by
David Duffy
|
Andrew Scott wrote:
{Quote hidden}>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.
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
|
The LCD init routine is on page 2.
Kind Regards,
Andrew Scott
-----Original Message-----
From: pic microcontroller discussion list
[EraseMEPICLISTspamBeGone
KILLspamMITVMA.MIT.EDU]On Behalf Of David Duffy
Sent: Thursday, 3 May 2001 11:12 AM
To: RemoveMEPICLISTspamBeGone
spamMITVMA.MIT.EDU
Subject: Re: [PIC]:
Andrew Scott wrote:
{Quote hidden}>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
{Quote hidden}> 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.
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
2001\05\03@090537
by
Olin Lathrop
> 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, .....olinRemoveME
embedinc.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
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?=
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
ok, you might try the [BUY] tag instead..
also did you try elfa.se and rs-components.com ?
----- Original Message ----- From: "Åke Neehr" <KILLspamake.neehr
TakeThisOuTTELIA.COM>
To: <TakeThisOuTPICLIST
spam_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
2001\06\05@194159
by
Tony Nixon
2001\06\06@150153
by
Fernando Barros
|
tnx, going to see what i can do
-----Mensagem original-----
De: Tony Nixon <spamTony.Nixonspam_OUT
@spam@ENG.MONASH.EDU.AU>
Para: spamPICLIST@spam@
STOPspamMITVMA.MIT.EDU <spamBeGonePICLISTspamBeGone
@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
salesKILLspam
spambubblesoftonline.com
--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-request@spam@
mitvma.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
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_OUT
mitvma.mit.edu
2001\06\20@133826
by
Malcom Foster
[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.....
TakeThisOuTmitvma.mit.edu
2001\06\20@135929
by
asena
|
You can start by they manufacturer web site: http://www.microchip.com
They have plenty of information to learn about!
Sena
{Quote hidden}> [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........
>
*********************************************************
Antonio Sergio Sena CT2GPW
TakeThisOuTasenaEraseME
RemoveMEbigfoot.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-requestRemoveME
.....mitvma.mit.edu
2001\06\20@152216
by
David Cary
2001\06\20@152224
by
Douglas Butler
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
[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
|
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_OUTsales
spamBeGonebubblesoftonline.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
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 EraseMElistserv
KILLspammitvma.mit.edu with SET PICList DIGEST in the body
2001\07\20@033129
by
Carole To
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-requestRemoveME
mitvma.mit.edu
2001\07\20@034619
by
Spehro Pefhany
|
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"
.....speff
spam_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-requestEraseME
spammitvma.mit.edu
'[PIC]:'
2001\08\17@103652
by
Dennis Oliver
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
|
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"
speffTakeThisOuT
KILLspaminterlog.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
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
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
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 RemoveMElistservTakeThisOuT
mitvma.mit.edu with SET PICList DIGEST in the body
2001\09\07@073106
by
Kevin Blain
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
2001\09\07@081543
by
Andy Kelley N1YEW
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 spamBeGonelistserv
spam_OUTmitvma.mit.edu with SET PICList DIGEST in the body
2001\09\07@091844
by
Olin Lathrop
>>
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.....
embedinc.com, http://www.embedinc.com
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamlistservKILLspam
@spam@mitvma.mit.edu with SET PICList DIGEST in the body
2001\09\07@114356
by
uter van ooijen & floortje hanneman
2001\09\27@095817
by
Salym Asp.
|
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 RemoveMElistservRemoveME
mitvma.mit.edu with SET PICList DIGEST in the body
2001\09\27@124349
by
Olin Lathrop
> 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@embedinc.com, http://www.embedinc.com
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservspam
mitvma.mit.edu with SET PICList DIGEST in the body
2001\09\27@164724
by
Lasse Madsen
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
2001\09\28@132011
by
Lasse Madsen
2001\09\28@151050
by
Olin Lathrop
2001\09\28@160325
by
Lasse Madsen
> 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
2001\09\28@212823
by
Bob Ammerman
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
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 EraseMElistservspamBeGone
spammitvma.mit.edu with SET PICList DIGEST in the body
2001\10\07@104342
by
James Caska
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
KILLspamcaska
virtualbreadboard.com
ujVM - 'The worlds smallest java virtual machine'
{Original Message removed}
2001\10\07@182200
by
Olin Lathrop
> 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}> 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?
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_OUT
spamembedinc.com, http://www.embedinc.com
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspam
@spam@mitvma.mit.edu with SET PICList DIGEST in the body
2001\10\07@182213
by
Olin Lathrop
2001\10\07@195028
by
Bob Barr
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@listserv
mitvma.mit.edu with SET PICList DIGEST in the body
2001\10\07@200921
by
James Caska
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
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
caskaRemoveME
virtualbreadboard.com
ujVM - 'The worlds smallest java virtual machine'
{Original Message removed}
2001\10\07@220520
by
cision Electronic Solutions
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
|
The new 18F series have a more easy to use stack.
David
Bob Barr wrote:
{Quote hidden}> 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
spamlistserv
mitvma.mit.edu with SET PICList DIGEST in the body
>
>
>
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspam_OUT
TakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body
2001\10\08@031651
by
James Caska
|
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@
RemoveMEvirtualbreadboard.com
ujVM - 'The worlds smallest java virtual machine'
{Original Message removed}
2001\10\08@090643
by
Olin Lathrop
> >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, spamolinspam
embedinc.com, http://www.embedinc.com
--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestspam_OUT
mitvma.mit.edu
2001\10\08@090646
by
Olin Lathrop
> 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}> 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
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}> ;}
>
> RETURN
>
>
> ;=========
> MAIN
> CALL TryGOTOExceptionHandler
> GOTO MAIN
********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, .....olin
.....embedinc.com, http://www.embedinc.com
--
http://www.piclist.com hint: To leave the PICList
spampiclist-unsubscribe-requestKILLspam
mitvma.mit.edu
2001\10\08@090650
by
Olin Lathrop
> 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, RemoveMEolinRemoveME
embedinc.com, http://www.embedinc.com
--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-request.....
KILLspammitvma.mit.edu
2001\10\08@091847
by
Scott Dattalo
|
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_OUT
spam_OUTmitvma.mit.edu
2001\10\08@105113
by
Olin Lathrop
> 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}> 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
********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, KILLspamolin
@spam@embedinc.com, http://www.embedinc.com
--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestRemoveME
mitvma.mit.edu
2001\10\08@213139
by
James Caska
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@
EraseMEvirtualbreadboard.com
ujVM - 'The worlds smallest java virtual machine'
{Original Message removed}
2001\10\09@003513
by
Scott Dattalo
|
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
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_OUT
RemoveMEvirtualbreadboard.com
ujVM - 'The worlds smallest java virtual machine'
{Original Message removed}
2001\10\15@162259
by
1?Q?Benjamin_Menk=FCc?=
2001\10\15@165457
by
Dennis Noordsij
|
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
|
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 [RemoveMEPICLIST
.....MITVMA.MIT.EDU]
För Benjamin Menküc
Skickat: den 15 oktober 2001 22:20
Till: spamPICLIST@spam@
MITVMA.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
|
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 scherpTakeThisOuT
koncon.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 .....listserv
TakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body
2001\10\25@183637
by
Luke Murphy
[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
2001\11\27@113515
by
Byron A Jeff
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-requestEraseME
mitvma.mit.edu
'[Pic]:'
2002\01\11@034751
by
Rod Phillips
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-request
spamBeGonemitvma.mit.edu
2002\01\19@032736
by
Henk Smit
'[PIC]:'
2002\03\28@082454
by
PY2NI
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
> 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, TakeThisOuTolin
TakeThisOuTembedinc.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
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
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
'[PIC]:'
2002\07\21@175649
by
Jai Dhar
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
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
|
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}>
> 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?
{Quote hidden}>
> 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
>
---------------------------------------------
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
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}> > 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
> >
>
>
> ---------------------------------------------
> 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
>
--
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
|
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}> 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
{Quote hidden}> > 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
{Quote hidden}> 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.
{Quote hidden}>
> BAJ
>
> > > 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
{Quote hidden}> > > 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
{Quote hidden}> > > 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
> > >
> >
> >
> > ---------------------------------------------
> > 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
> >
>
> --
>
http://www.piclist.com hint: PICList Posts must start with ONE topic:
> [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
>
---------------------------------------------
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
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}>
> > 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
> >
> > > > 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
> > > >
> > >
> > >
> > > ---------------------------------------------
> > > 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
> > >
> >
> > --
> >
http://www.piclist.com hint: PICList Posts must start with ONE topic:
> > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
> >
>
>
> ---------------------------------------------
> 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
>
--
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
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
> 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
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
> 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 ~
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
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-request
spam_OUTmitvma.mit.edu
'[PIC]:'
2002\12\08@234906
by
kirby warkentin
[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
[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
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@
adacel.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
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.HomannTakeThisOuT
KILLspamadacel.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
|
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@
spamADACEL.COM>
To: <RemoveMEPICLISTRemoveME
TakeThisOuTMITVMA.MIT.EDU>
Sent: Sunday, December 08, 2002 11:56 PM
Subject: Re: [PIC]:
{Quote hidden}> 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
>
Peter.HomannTakeThisOuT
@spam@adacel.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\21@015935
by
Michael Simpson
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 listservTakeThisOuT
spamBeGonemitvma.mit.edu with SET PICList DIGEST in the body
2002\12\21@085928
by
Andy Kunz
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}>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
spamlistservTakeThisOuT
mitvma.mit.edu with SET PICList DIGEST in the body
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listserv
spamBeGonemitvma.mit.edu with SET PICList DIGEST in the body
2002\12\23@111723
by
llile
|
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 <.....montanaTakeThisOuT
EraseMEFAST.NET>
Sent by: pic microcontroller discussion list <RemoveMEPICLISTspam
KILLspamMITVMA.MIT.EDU>
12/21/02 07:58 AM
Please respond to pic microcontroller discussion list
To: STOPspamPICLISTEraseME
MITVMA.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 listservspamBeGone
mitvma.mit.edu with SET PICList DIGEST in the body
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listserv@spam@
mitvma.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
|
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}> 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.
>
>
>
>
--
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
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_OUTmontana
spamFAST.NET>
To: <PICLISTspam_OUT
RemoveMEMITVMA.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
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
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
|
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
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
|
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_OUT
spam_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_OUT
TakeThisOuTmitvma.mit.edu
>
2003\06\27@130917
by
Jeremy Darling
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
'[PIC]:'
2003\08\04@203147
by
kirby warkentin
'[PIC]:'
2003\11\04@184736
by
John Murray
|
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
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
|
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
|
> 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@PICLISTspam
spam_OUTMITVMA.MIT.EDU] On Behalf Of Mohit Mahajan
Sent: Wednesday, November 05, 2003 6:36 PM
To: KILLspamPICLIST
KILLspamMITVMA.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
[KILLspamPICLISTspam
spamMITVMA.MIT.EDU] On Behalf Of John Murray
Sent: Wednesday, November 05, 2003 5:13 AM
To: PICLISTKILLspam
.....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)
|
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
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
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
piclistspamBeGone
nerdulator.net
---{Original Message removed}
'[PIC]:'
2003\12\22@091359
by
Herbert Graf
'[PIC]:'
2004\01\01@185608
by
MSullivan
'[PIC]:'
2004\02\10@162927
by
Jim Franklin
|
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-requestKILLspam
.....mitvma.mit.edu
part 2 14204 bytes content-type:image/jpeg; (decode)

2004\02\10@190709
by
Ken Pergola
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_OUT
spamBeGonemitvma.mit.edu
2004\02\10@225002
by
Jim Franklin
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
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@mitvma.mit.edu
2004\02\11@053908
by
Roland
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}>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\14@101406
by
Dave Tweed
2004\02\14@101406
by
Dave Tweed
'[PIC]:'
2004\05\24@191705
by
Nikhil Praveen
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 RemoveMElistservTakeThisOuT
spammitvma.mit.edu with SET PICList DIGEST in the body
2004\05\24@194252
by
Andrew Warren
Nikhil Praveen <.....PICLIST@spam@
spamBeGonemitvma.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 -- STOPspamaiwTakeThisOuT
cypress.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@
mitvma.mit.edu with SET PICList DIGEST in the body
More... (looser matching)
- Last day of these posts
- In 2004
, 2005 only
- Today
- New search...