Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #382321
| From | "P E Schoen" <paul@pstech-inc.com> |
|---|---|
| Newsgroups | sci.electronics.design |
| Subject | Re: Reformatted update on table call problem |
| Date | 2015-10-21 14:06 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <n08k3e$7sb$1@dont-email.me> (permalink) |
| References | (8 earlier) <HSEUx.2146$vj4.821@fx05.iad> <mvvnp9$oek$1@dont-email.me> <pdlVx.130780$5N3.19009@fx17.iad> <n06m6m$vr1$1@dont-email.me> <RAFVx.134692$fA1.69561@fx21.iad> |
"Robert Baer" wrote in message news:RAFVx.134692$fA1.69561@fx21.iad...
> P E Schoen wrote:
>
>> Here are some tutorials and other information on the IDE and software
>> simulator/debugger. Some may be for older versions but should be fine for
>> the most basic operation:
>
> http://nnp.ucsd.edu/phy120b/pic_manuals_pdf/mplab_simu_edit_user.pdf
> (from 2001)
>
> http://www.siriusmicro.com/mplabx-c.html (For MPLABX and C)
>
> http://www.microchip.com/developmenttools/getting_started/gs_mplab3.aspx
> (IDE 6.6)
>
> https://www.youtube.com/watch?v=pnkUOL0mmyA (from 2008)
>
> http://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_User_Guide_51519c.pdf
> (2009)
>
> http://www.puntoflotante.net/EASY-GUIDE-TO-THE-MPLAB-IDE-SIMULATOR.pdf
>
> http://ww1.microchip.com/downloads/en/DeviceDoc/52027B.pdf (MPLABX 2011)
>
>> It would be very helpful to study and understand the finer points of the
>> IDE and simulator, and the basic operation of the Microchip devices. PICs
>> are very powerful, especially newer versions, and with such power comes
>> responsibility to know their capabilities and the tools to program them.
>> It is a steep learning curve, but well worth the effort.
>> Otherwise, perhaps it would be good to use the Arduino or BASIC stamp or
>> other simplified platforms.
> Thanks!
> Fortunately, i had about half of those, so saved download time.
It would also help to know just what you are trying to do, and why you chose
the device you are using and why you are programming in assembler. At one
point it seemed you were making a sine table, and elsewhere it seemed like
an ASCII look-up. For a sine table and similar math functions, it may be
better to use an actual sine function, or a table with a few data points and
cubic spline* (or similar) interpolation to get good accuracy. There are
always trade-offs between code size and complexity, and speed, however.
Here is a link to a sine table implementation:
http://www.brouhaha.com/~eric/pic/sine.html
Other resources:
http://www.piclist.com/techref/microchip/math/index.htm
Paul
*Here is a simple spline function in C
/*****************************************************************************
This spline function returns a floating point y value for the given
x_value
n is the number of points in the input array
*****************************************************************************/
float spline( float x_val, int n, float *x, float *y )
{
float y_val = 0;
float num, den;
int i,j;
for (i=0; i<n; i++)
{
num = 1;
for (j=0; j<n; j++)
{
if (j != i)
num *= (x_val - x[j]);
}
den = 1;
for (j=0; j<n; j++)
{
if (j != i)
den *= (x[i] - x[j]);
}
y_val += (y[i] * ( num/den ) );
}
return(y_val);
}
Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-11 23:17 -0700
Re: OT: Reformatted update on table call problem piglet <erichpwagner@hotmail.com> - 2015-10-12 09:17 +0100
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-12 19:11 -0700
Re: OT: Reformatted update on table call problem Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-10-13 08:17 +0100
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-13 22:26 -0700
Re: OT: Reformatted update on table call problem piglet <erichpwagner@hotmail.com> - 2015-10-14 07:50 +0100
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-14 16:35 -0700
Re: OT: Reformatted update on table call problem Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-10-15 12:01 +0100
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-15 22:41 -0700
Re: OT: Reformatted update on table call problem piglet <erichpwagner@hotmail.com> - 2015-10-16 07:09 +0100
Re: OT: Reformatted update on table call problem Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-10-16 08:50 +0100
Re: OT: Reformatted update on table call problem piglet <erichpwagner@hotmail.com> - 2015-10-16 09:31 +0100
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-17 21:34 -0700
Re: OT: Reformatted update on table call problem piglet <erichpwagner@hotmail.com> - 2015-10-18 09:42 +0100
Re: OT: Reformatted update on table call problem Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-10-19 09:12 +0100
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-19 23:04 -0700
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-17 21:08 -0700
Re: OT: Reformatted update on table call problem piglet <erichpwagner@hotmail.com> - 2015-10-18 09:45 +0100
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-19 23:08 -0700
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-17 21:19 -0700
Re: OT: Reformatted update on table call problem piglet <erichpwagner@hotmail.com> - 2015-10-18 09:50 +0100
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-19 23:14 -0700
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-17 21:03 -0700
Re: OT: Reformatted update on table call problem piglet <erichpwagner@hotmail.com> - 2015-10-18 10:14 +0100
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-19 23:31 -0700
Re: Reformatted update on table call problem "P E Schoen" <paul@pstech-inc.com> - 2015-10-20 20:30 -0400
Re: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-20 22:42 -0700
Re: Reformatted update on table call problem "P E Schoen" <paul@pstech-inc.com> - 2015-10-21 14:06 -0400
Re: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-23 21:01 -0700
Re: Reformatted update on table call problem "P E Schoen" <paul@pstech-inc.com> - 2015-10-24 01:08 -0400
Re: Reformatted update on table call problem krw <krw@nowhere.com> - 2015-10-24 09:05 -0400
Re: OT: Reformatted update on table call problem Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-10-12 09:46 +0100
Re: OT: Reformatted update on table call problem piglet <erichpwagner@hotmail.com> - 2015-10-12 10:39 +0100
Re: OT: Reformatted update on table call problem Martin Riddle <martin_ridd@verizon.net> - 2015-10-12 08:24 -0400
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-12 19:54 -0700
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-12 19:55 -0700
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-12 19:49 -0700
Re: OT: Reformatted update on table call problem Robert Baer <robertbaer@localnet.com> - 2015-10-12 19:44 -0700
Re: OT: Reformatted update on table call problem (OOPS!) Robert Baer <robertbaer@localnet.com> - 2015-10-12 23:52 -0700
csiph-web