Search found 1237 matches

by Jerry Messina
Sat Sep 05, 2020 10:28 pm
Forum: Modules
Topic: VERIFY USART2_TX/RX PIN error with USART_2
Replies: 2
Views: 291

Re: VERIFY USART2_TX/RX PIN error with USART_2

Garry, The '#option' statements must be before the module that needs them is included. The important ones here would be: #option USART2_TX = PORTA.1 ' uart2 TX data out - RP1 #option USART2_RX = PORTA.5 ' uart2 RX data in - RP2 Include "USART2.bas" Your pps statements look ok to me.
by Jerry Messina
Tue Sep 01, 2020 5:05 pm
Forum: IDE
Topic: Problem with the path to the Library folder
Replies: 21
Views: 1887

Re: Problem with the path to the Library folder

If you were to delete the two folders:
c:\users\g\documents\swordfish\userlibrary
C:\ProgramData\Mecanique\Swordfish\userlibrary

then I don't know where in the world it could pull a copy from!
by Jerry Messina
Tue Sep 01, 2020 4:27 pm
Forum: IDE
Topic: Problem with the path to the Library folder
Replies: 21
Views: 1887

Re: Problem with the path to the Library folder

Putting files into the userlibrary allows you to override what's in the standard library folder. If you want to use the standard copy, get rid of the one in userlibrary. The installer doesn't touch what's in the userlibrary... you wouldn't want it to delete modules you may have changed. That does me...
by Jerry Messina
Sat Aug 29, 2020 11:51 pm
Forum: Modules
Topic: Library modules and recent compiler updates
Replies: 3
Views: 327

Re: Library modules and recent compiler updates

Right... it should have been installed as part of 2.2.3.4.

If you have the older version in your UserLibrary folder, remove it and when you rebuild your project the new version should be included in its place.
by Jerry Messina
Sat Aug 22, 2020 8:25 pm
Forum: Modules
Topic: Library modules and recent compiler updates
Replies: 3
Views: 327

Library modules and recent compiler updates

Just a reminder/FYI- Recent versions of the compiler now include some updated modules as part of the standard libraries. Any files in the UserLibrary folder will override those in the compiler Library folder, so you should review the contents of your UserLibrary folder and make sure you're not overr...
by Jerry Messina
Sat Aug 22, 2020 7:36 pm
Forum: Modules
Topic: Can't get spi to read data
Replies: 19
Views: 2362

Re: Can't get spi to read data

some files like intosc.bas are now included as part of the standard libraries. The compiler will look in the user library folder first, and then the library folder. Remove any old files from the user library folder and you'll get the new ones. After you compile a project,open the .idf file (it's a t...
by Jerry Messina
Sat Aug 22, 2020 10:08 am
Forum: Modules
Topic: Can't get spi to read data
Replies: 19
Views: 2362

Re: Can't get spi to read data

What are the full paths for the two copies of intosc.bas you found and what OS are you running?

According to the installer script, the various library and include files should end up in:
C:\ProgramData\Mecanique\Swordfish
Includes
Library
Plugin
Samples
UserLibrary
by Jerry Messina
Wed Aug 19, 2020 10:16 pm
Forum: Modules
Topic: Can't get spi to read data
Replies: 19
Views: 2362

Re: Can't get spi to read data

Garry, According to my notes, intosc and setalldigital support for the 47J13 was added in SF version 2.2.3.3 and later. There's a missing comment brace '{' around your "These are how I have been..." comment. You'd have to comment out the SetAllDigital call since you commented out the include. You al...
by Jerry Messina
Tue Aug 04, 2020 12:53 pm
Forum: General
Topic: Syncronus serial port
Replies: 2
Views: 671

Re: Syncronus serial port

I've only ever used the synchronous mode to transmit, so I probably can't be much help. To receive I think you have to set either SREN or CREN, and clear them when you want to transmit. There's a better description of using sync mode in other datasheets like the 26K22. If you're the master and you d...
by Jerry Messina
Sun Aug 02, 2020 12:07 pm
Forum: General
Topic: Forum zip files
Replies: 7
Views: 1102

Re: Forum zip files

I've tried a few repair tools, but so far none of them have produced anything remotely usable.
by Jerry Messina
Sat Aug 01, 2020 3:22 pm
Forum: General
Topic: Forum zip files
Replies: 7
Views: 1102

Re: Forum zip files

I see the same issue... when I go to unzip the file I get "data error" so it's not just you.

From the few I've looked at, it only seems to be zip files that are in the forum posts and not ones from the wiki.
by Jerry Messina
Wed Jul 29, 2020 9:42 am
Forum: Modules
Topic: Can't get spi to read data
Replies: 19
Views: 2362

Re: Can't get spi to read data

Ouch! Sorry to hear that Garry. I'm one of the unlucky ones who can work from home, so as of right now I'm still employed. When you get back to it I have one suggestion. In the microchip example driver, they set the SPI control registers to: // SPI_MODE_0 // SMP = 0 'Input data is sampled at the mid...
by Jerry Messina
Sat Jul 25, 2020 2:41 pm
Forum: Modules
Topic: Can't get spi to read data
Replies: 19
Views: 2362

Re: Can't get spi to read data

Looking through the datasheet for the MRF89XA, I think you want a different SPI setup. SPI mode 0 is what's called out in the datasheet, and the ref library from mchip use this mode too. Try this and see what happens. You'll have to adjust the SPI pin #options, IO pin assignments and PPS settings to...
by Jerry Messina
Wed Jul 22, 2020 11:27 pm
Forum: Modules
Topic: Can't get spi to read data
Replies: 19
Views: 2362

Re: Can't get spi to read data

Hi Garry, The write-read sequence is done in the '_transfer()' function: inline function _transfer(b as WREG) as WREG begin_transfer() SSPBuffer = b // send the byte wait_for_transfer() // wait for byte to be sent/received // note: instead of using 'as SSPBUF' function return value, // this forces r...
by Jerry Messina
Fri Jul 17, 2020 3:14 pm
Forum: IDE
Topic: PicKit4 as a programmer in IDE
Replies: 17
Views: 1667

Re: PicKit4 as a programmer in IDE

same here