Search found 152 matches

by Coccoliso
Thu May 25, 2017 4:20 pm
Forum: General
Topic: A generic 32 bit counter
Replies: 17
Views: 14138

Re: A generic 32 bit counter

Hi Jerry, then.. 1) PWM by CCP5 controlled by TMR4 at 1MHz and duty of 50% with output on PORTB.5 .. done 2) TMR3 listen and count .. done .. all work fine but.. at this point I tried to enable an interrupt in case of TMR3 overflow to lengthen the count period with a recycle counter. I started to ha...
by Coccoliso
Mon May 22, 2017 9:59 am
Forum: General
Topic: A generic 32 bit counter
Replies: 17
Views: 14138

Re: A generic 32 bit counter

Hi Jerry, TMR0 or TMR3 CLKIN on the same pin. without physically connecting the PWM to the counter input?!? :D .. or I figured badly I was trying with TMR1 and CCP2 because I did not need the CAN but I follow your advice .. I rewrite everything by setting TMR3 and CCP5. This MPU is a bomb :shock: . ...
by Coccoliso
Sun May 21, 2017 4:10 pm
Forum: General
Topic: A generic 32 bit counter
Replies: 17
Views: 14138

Re: A generic 32 bit counter

Hi Jerry, documenting I read that the 18F26K80 (which I have already used and have in my basket and you suggested me) has the features I need (4 CCP / 1 ECPP). I intend to use a PWM channel with TMR1 as a counter to have the uSec number and I can use another PWM to adjust the spindle speed. WORK IN ...
by Coccoliso
Sat May 20, 2017 8:11 am
Forum: Compiler
Topic: Ease of porting to Firewing
Replies: 4
Views: 3778

Re: Ease of porting to Firewing

Hi, you better use Swordfish Toolsuite for Firewing and recompile your sources for the PIC18 family and test it with your current HW. When your whole PIC18 HW works you can switch to other core and you've already learned how to use the new environment :D I ported all from Swordfish to Firewing (and ...
by Coccoliso
Sun May 14, 2017 7:14 am
Forum: General
Topic: A generic 32 bit counter
Replies: 17
Views: 14138

Re: A generic 32 bit counter

Hi Jerry, I use a 18F2685 at 40MHz and with HW USART for TX/RX comunications and must use the PWM. At the moment there is no need to use other timers. The pulses I have to generate are between 6 and 10 uSec for a 3 axes CNC and clearly logic brings much of the work but I must keep the pulse duration...
by Coccoliso
Sat May 13, 2017 9:03 am
Forum: General
Topic: A generic 32 bit counter
Replies: 17
Views: 14138

A generic 32 bit counter

Hi at all, there is a counter that is incremented automatically by which I can understand how many "ticks" are spent internally in a procedure after I call other works? I would need it with a resolution as close as possible to uSeconds and as you've been told me to work with an interrupt (like Ticks...
by Coccoliso
Fri May 12, 2017 8:06 am
Forum: IDE
Topic: What Kind of Language is Swordfish
Replies: 5
Views: 5396

Re: What Kind of Language is Swordfish

---
by Coccoliso
Sat Apr 29, 2017 8:05 am
Forum: IDE
Topic: Swordfish and Basic Stamp Pbasic
Replies: 6
Views: 4905

Re: Swordfish and Basic Stamp Pbasic

...
by Coccoliso
Fri Mar 17, 2017 10:46 am
Forum: General
Topic: PicKit2 Standalone Programmer
Replies: 4
Views: 5366

Re: PicKit2 Standalone Programmer

Hi,

this can help .. "PK2 Device File Editor" (is in a G00gle project site )
by Coccoliso
Tue Feb 28, 2017 11:26 am
Forum: Compiler
Topic: Use OPTION to Include a module
Replies: 2
Views: 3065

Re: Use OPTION to Include a module

Hi, I found the solution looking Firewing and it's all easier than expected and if it helps someone else : #option MY_MODULE = mymodule // (module name without .BAS and spaces) or #option MY_MODULE = "mymodule.bas" .. and now .. #If Not(IsOption(MY_MODULE )) #error "Undefined option MY_MODULE" #endi...
by Coccoliso
Tue Feb 28, 2017 11:00 am
Forum: Compiler
Topic: Use OPTION to Include a module
Replies: 2
Views: 3065

Use OPTION to Include a module

Hi at all, there is a way to specify a module to be included through OPTION ? #option LOGO = "mylogo.jpg" #if IsOption(LOGO) Public Const cLOGO_IMAGE_NAME = LOGO #else #error "Undefined option LOGO" #endif .. this works perfectly and I can refer to the file by replacing his name with cLOGO_IMAGE_NAM...
by Coccoliso
Sun Jan 29, 2017 5:20 pm
Forum: User Modules
Topic: FT800 / Gameduino2 Library for Swordfish
Replies: 2
Views: 4761

Re: FT800 / Gameduino2 Library for Swordfish

Hi, to solve problems with - cmd_progress() - cmd_slider() - cmd_dial() - cmd_track() and solve any tracking problems on many displayed objects apply this changes: '******************************************************************************** '* Name : cmd_progress * '* Purpose : Draw a progress ...
by Coccoliso
Thu Jan 19, 2017 5:21 pm
Forum: User Modules
Topic: Neopixels WS2812B
Replies: 10
Views: 7303

Re: Neopixels WS2812B

Hi Octal, your code works perfectly :wink: and for a 40MHz frequency I just changed the number of calls to the NOP You send 4 NOP (1x4) or 8 NOP (2x4) for 64MHz, then for 40MHz the numbers are 3 NOP or 7 NOP { **************************************************************************** * Name : One ...
by Coccoliso
Thu Jan 19, 2017 12:20 pm
Forum: User Modules
Topic: Neopixels WS2812B
Replies: 10
Views: 7303

Re: Neopixels WS2812B

Hi Octal,

now I modify it to make it work at 40 MHz.

OK for DMA and PIC24/32.
Arduino and Netduino also use the SPI for the generation of pulses.

Thanks for this source and I think that may be of interest to many.
by Coccoliso
Wed Jan 18, 2017 6:51 pm
Forum: User Modules
Topic: Neopixels WS2812B
Replies: 10
Views: 7303

Re: Neopixels WS2812B

Hi at all, GOOD NEWS ! :D With this SUB { **************************************************************************** * Name : SendPixel (PRIVATE) * Purpose : NRZ pulse generator * This sub was written by MichelJasmin in this forum * http://www.picbasic.co.uk/forum/ * showthread.php?t=19408&p=12845...