Re: [Flashforth-devel] more fun with PIC18F46K22-s...
Brought to you by:
oh2aun
From: craig b. <dab...@ya...> - 2019-12-09 14:42:57
|
Mikael, Thanks much! I'll see if I can get these suggestions to work for me this next weekend. I didn't know that the user interrupts might not be getting serviced, I may try setting up some vectors in eeprom and hook the main interrupt service to check them if they're set to something valid. I've extended the sys-tick to 32 bits and added a word "dticks" to toss the double onto the stack when needed. I've looked back into the Buffered TX code and still don't see the hole that the character is leaking out of when the output string exceeds the buffer size, but since I'm going to use output packets of less than 32 bytes for my TX2 it might work to roll a custom version back into the kernal. It looks like you were using the linker to align all of the buffers on 16 byte boundries back then. Do the "**_FULL_BIT" macros rely on that? (I never used linker scripts, I just hard-positioned my variables in the *.asm (grin)). Oh, and yes, I'm pushing the chip to 64mhz. I haven't tried overclocking yet. Thanks Again! (and keep smiling), craig On Sunday, December 8, 2019, 5:44:10 PM EST, Mikael Nordman <mik...@fl...> wrote: I am not sure I fully understand what you are doing, but... I hope you are running at full clock speed. To get more capacity I would use HW timers for the ADC and PWM. That saves many cycles. Remember that your user interrupt routine is checked at every interrupt. Except in the latest FlashForths. There the system tick will not check the user interrupt. You can put the UART2 stuff in two background tasks. Something like this. I assume RX2 and TX2 calls PAUSE if they would block. 0 30 30 0 task: rx2.task : rx2.loop init.rx2 begin rx2 processchar again ; 0 30 30 0 task: tx2.task : tx2.loop init.tx2 begin get.char.from.tx2.memory.queue tx2 again ; : main init.uart2 ['] rx2.loop rx2.task tinit rx2.task run ['] tx2.loop tx2.task tinit tx2.task run begin bla.bla pause put.char.to.tx2.memory.queue again ; Mikael _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel |