Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Recent content by tumbleweed

  1. T

    Fun with AI and swordfish basic

    So, that's 6 instructions at 62.5ns each for a total of 375ns. Put that in a loop and it'll be about 400ns. The send byte routine I posted in #22 will be faster than #31
  2. T

    Pic18f25q10 osccon1 settings swordfish basic

    I don't know what the asm looked like, but a 64Mhz clock has a 16Mhz instruction cycle time...
  3. T

    Pic18f25q10 osccon1 settings swordfish basic

    For an 18FxxQ10 what I posted should get you 64Mhz using the int osc. With that device the PLL is only for external clocks, so you can ignore whatever AI is telling you. How are you measuring the frequency?
  4. T

    Pic18f25q10 osccon1 settings swordfish basic

    with the code in post #10 I get: MAIN ?I000000_F002_001935_M000002 ; L#MK OSCTUNE = INTOSC_OSCTUNE MOVLB 14 CLRF OSCTUNE,1 ?I000001_F002_001938_M000002 ; L#MK SET_INTOSC(_clock) ?I000002_F002_001938_M000002 ; L#MK SET_INTOSC(_clock) MOVLW 0X60 MOVWF OSCCON1,1...
  5. T

    Pic18f25q10 osccon1 settings swordfish basic

    Are you saying you tried what I suggested and it didn't compile? Intosc.bas has been included as a standard library file for quite a while now.
  6. T

    Pic18f25q10 osccon1 settings swordfish basic

    Then do this- Device=18F25Q10 Clock=64 Include "intosc.bas" It'll take care of all the register and config settings for you
  7. T

    PIC KIT 3 not able to program dsPIC

    According to the device support doc for MPLABX v5.45 , the PK3 is supported as both a debugger and programmer for the dsPIC30F2010. Of course, that doesn't mean there aren't issues, especially since we're talking MPLABX here.
  8. T

    Fun with AI and swordfish basic

    here's a version of the SendByte() sub that would produce a lot better timing (based on that original AI code) Sub SendByte(ByVal DataByte As Byte) dim i as byte For I = 0 To 7 ' Loop 8 times for 8 bits ' send bits msb to lsb If DataByte.bits(7) = 1 Then ' Send a...
  9. T

    Fun with AI and swordfish basic

    Here's post #1 modified for Swordfish. It compiles... whether it works or not you'll have to ask AI. I wouldn't do it this way, but that wasn't the question... '------------------------------------------------------------------------------- ' WS2812B Basic Control Example for Swordfish '...
  10. T

    Fun with AI and swordfish basic

    Lots of stuff in there just flat out isn't Swordfish BASIC syntax. That shouldn't be a real surprise since using AI for embedded programming is a waste of time
  11. T

    using a RTC in SF basic

    That should work out really well as long as you don't need the osc to run or the leds to light. The transistors to reset the 595s are a waste of time.
  12. T

    going out on a limb and praying the schematic is correct

    If you connect the 595 CLOCK to the K22 RC3 (SCK1) and the first 595 DS SER data in to the K22 RC5 (SDO1) that would allow you the option of using the hardware SPI module (MSSP1) and SPI.BAS to shift out the serial data instead of bit-banging it using SHIFT.BAS. This assumes you daisy-chain the...
  13. T

    going out on a limb and praying the schematic is correct

    If I was doing it I'd connect up the 595s in a daisy chain similar to post 1 with one clk and data pin using the SPI mssp peripheral instead of bit banging using SHIFT. Rig up a timer and clock out all 80 bits at once... probably take <20usec without much wrangling.
  14. T

    going out on a limb and praying the schematic is correct

    yup... it supports ALL the pic18F devices, even the new ones. USB support hasn't been updated in a while, so it's still limited to HID and CDC.
  15. T

    going out on a limb and praying the schematic is correct

    If you think that then you haven't tried to write the code yet to do this. As far as 2 seconds for each shift reg, that's only if you add all sorts of delays where they shouldn't be

Latest threads

New Articles From Microcontroller Tips

Back
Top