Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - faster micro

(you are viewing a thread; or go back to list of threads)

faster micro (by David R)

Hi,
can Ldmicro support a micro with a faster processor like A PIC16F1937 or faster atmel something better ?
I often have the need for more speed when working with stepper motors or encoders etc.
Regards
David.
Sun Oct 24 2010, 15:52:45
(no subject) (by Evan Raftery)
And with support for I2C & SP1 functions would be fantastic.
Mon Oct 25 2010, 02:38:38
(no subject) (by Jonathan Westhues)
At some point, I want to do a PIC18 code generator, which, among other things, would allow me to support many faster parts. But I currently am busy enough with my day job that I can't say when exactly that will happen.

The fastest currently-supported parts are the AVRs, at 16 MHz. Note that the AVRs run at 1 MHz/MIPS, so that's 16 MIPS. The PICs run at 4 MHz/MIPS (so at 20 MHz, for example, that's 5 MIPS).
Mon Oct 25 2010, 02:48:00
(no subject) (by BoumPower (Switzerland))
Hi Jonathan

I suggest that we join our efforts...

I have code to compile ldmicro files, the current working output is C (for microchip C18 compiler, but easy to target others).
I already added some new features, and it's very easy to add new elements while all the compiler is objet-oriented.

Best regards
Mon Oct 25 2010, 03:18:31
(no subject) (by David R)
Thanks,
I will rebuild my project with A mega32 and try it.

David.
Mon Oct 25 2010, 05:35:30
(no subject) (by Evan Raftery)
Yes, I tried measuring a pulse input using a sensor generating an input signal of 140hz with a pulse width of 10%. Once the frequency exceeded 50Hx the 16F887 was unable to read the pulse.
The crystal used was 16 Mhz and inpout was 24VDC via a opto isolator.

What is the usable frequency input & how can it be calculated?

Is the AVR part capable of doing so?
My reason for the pic was to generate a PWM which it does so at 20kHz. The AVR code generated gave 7.8kHz as a maximum so I could not use it. Also the AVR parts other than the 64 & the 128 do not support PWM in LDmicro. Is there a work around?
Thu Oct 28 2010, 20:41:55
(no subject) (by Jonathan Westhues)
The PWM thing is a real hardware limitation. The AVRs support only certain divisors (in powers of two), while the PICs let you choose that more freely.

To always catch a 10% duty cycle pulse at 140 Hz, you need a cycle time of at most (1/140)*(10 %) ~ 0.7 ms. You can change the cycle time in Settings -> MCU Parameters, but the cycle time must be chosen long enough that your program has time to execute. If your program is too long (or your crystal is too slow), then the execution time will exceed the cycle time, and things will screw up.

With a simple program, the 0.7 ms might be okay even on a PIC16; the only way to know is to try it.
Fri Oct 29 2010, 00:06:27
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):