Searching \ for '[EE]: Multiple values accelerating at different ra' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=multiple+values
Search entire site for: 'Multiple values accelerating at different ra'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: Multiple values accelerating at different ra'
2001\10\13@122303 by TH

flavicon
face
I've got this application were multiple RAM values in an array are given a
target value which can be above or below their current value and must reach
this target within a given time.

For example :

ORIGINAL VALUES A=010 B=020 C=055 D=255 E= 000 etc ...

TARGET VALUES   A'=020 B'=010 C'=055 D'=000 E'=255 etc ...

time required = 1,000,000 processor cycles (50 Hz refresh rate with a 20MHz
processor)

Given these conditions :
A must increase by 10 in 1,000,000 cycles
B must decrease by 10 in 1,000,000 cycles
C must not change in 1,000,000 cycles
D must decrease by 255 in 1,000,000 cycles
E must increase by 255 in 1,000,000 cycles
etc ...

The first obvious way to do this is :
(A'-A)/1,000,000 = RateA = 0.00001 per cycle
(B'-B)/1,000,000 = RateB = -0.00001 per cycle
(C'-C)/1,000,000 = RateC = 0 per cycle
(D'-D)/1,000,000 = RateD = -0.000255 per cycle
(E'-E)/1,000,000 = RateE = 0.000255 per cycle

and continuously multiply the values in memory by these constants until
we're done counting 1,000,000 cycles, phew!

Since I don't need such a high resolution (1 cycle) and couldn't possibly
calculate all these values fast enough (with a PIC)I could simplfy these
operations by updating the values only every 20,000 cycles (50 Hz refresh
rate with a 20MHz clock) his still gives some rather hefty fractional values
to handle with a PIC. Besides, this method requires twice the amount of
memory to store the Rate constants ...

Any thoughts ?

regards,

Tobie Horswill
Le Projet Ex Machina, QC, CAN.
spam_OUTthorswilTakeThisOuTspamexmachina.qc.ca

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


2001\10\13@163844 by Olin Lathrop

face picon face
> Since I don't need such a high resolution (1 cycle) and couldn't possibly
> calculate all these values fast enough (with a PIC)I could simplfy these
> operations by updating the values only every 20,000 cycles (50 Hz refresh
> rate with a 20MHz clock) his still gives some rather hefty fractional
values
> to handle with a PIC. Besides, this method requires twice the amount of
> memory to store the Rate constants ...
>
> Any thoughts ?

How about a Bresenham algorithm?


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

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


2001\10\14@171351 by TH

flavicon
face
Olin, I did a quick search on the net for "Brensenhams Algorithm" and
quickly found several explanations of this Computer Graphics method for
selecting which pixel should be illuminated when drawing a line on-screen.
It fits nicely with my objective, it's simply a matter of replacing the X
displacement by the number of processor cycles and the Y displacement by the
difference between the target and the original values =) I also found an
Integer version of the algorithm which I think can be adapted quite easily
to PIC assembly. =)) For those interested, here is one of the best documents
I've found :
graphics.cs.ucdavis.edu/GraphicsNotes/Bresenhams-Algorithm/Bresenhams
-Algorithm.html

Have you worked in computer graphics before or is this algorithm considered
common knowledge ?

Anyway, many thanks!

Tobie Horswill
Le Projet Ex Machina, QC. CAN.
EraseMEthorswilspam_OUTspamTakeThisOuTexmachina.qc.ca

{Original Message removed}

2001\10\14@185858 by Bob Ammerman

picon face
On this discussion list Bresenham is considered common knowledge by now -
and we've keep finding new uses for it, too.

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

{Original Message removed}

2001\10\15@100744 by Olin Lathrop

face picon face
> Have you worked in computer graphics before or is this algorithm
considered
> common knowledge ?

I used to design display controllers and first ran into Bresenham's
algorithm there, however it's widely used in other applications.  Jack
Bresenham's original problem was to make a pen plotter driven by stepper
motors follow an arbitrary straight line.  I wrote a paper once about how
Bresenham's algorithm can be extended to start and stop at fractional end
points (subpixel addressing) and still maintain the same integer algorithm
after setup.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, olinspamspam_OUTembedinc.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\10\17@071315 by TH

flavicon
face
Well huuhhhh? Sorry, I'm not an EE so I'll have to look that up before I can
answer your question =)

Thx!

Tobie Horswill
Le Projet Ex Machina,QC, CAN.
@spam@thorswilKILLspamspamexmachina.qc.ca

{Original Message removed}

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