Search found 1246 matches

by Jerry Messina
Sun Aug 01, 2021 1:53 pm
Forum: User Modules
Topic: arduino ToneLibrary and Ringtone RTTTL Player
Replies: 1
Views: 22

arduino ToneLibrary and Ringtone RTTTL Player

I've been playing around with generating tones lately, so I ported the arduino Tone library to SF and added a few enhancements like blocking/non-blocking mode, playing arrays, etc. There's also a RTTTL (RingTone Text Transfer Language)) player included I put it on the wiki... ToneLibraryAndRingtoneR...
by Jerry Messina
Wed Jul 21, 2021 12:43 pm
Forum: Compiler
Topic: recent compiler problems
Replies: 10
Views: 78

Re: recent compiler problems

so i'm pretty sure something changed That's odd... I check USART.bas going all the way back to v2.2.3.0 ICC 1.2.0.0 and it's pretty much the same, so I don't think the baudrate settings should be any different. and on checking its back to ver 2.2.5 icc1.1.6.4 is this likely to my our it company rev...
by Jerry Messina
Wed Jul 21, 2021 10:25 am
Forum: Compiler
Topic: recent compiler problems
Replies: 10
Views: 78

Re: recent compiler problems

There've been some changes to the usart modules to add support for new devices, so it's possible that has inadvertently changed something and it's not picking the right combination of settings anymore. Try adding this to your 'include' section: #option USART_BRG16 = true Include "usart.bas" With SF ...
by Jerry Messina
Tue Jul 20, 2021 11:48 am
Forum: Compiler
Topic: recent compiler problems
Replies: 10
Views: 78

Re: recent compiler problems

Great, Rich.

Let us know if you still have issues
by Jerry Messina
Tue Jul 20, 2021 9:40 am
Forum: Compiler
Topic: recent compiler problems
Replies: 10
Views: 78

Re: recent compiler problems

The online update should get you V2.2.3.6. After that, download https://www.sfcompiler.co.uk/wiki/wiki-uploads/SwordfishUser/Modules/sf_update_2_22_2021.zip Unzip the file to a folder and run SF_UPDATE_2_22_2021.exe That will get you completely up to date with v2.2.3.6, ICC v1.2.0.7, and device files.
by Jerry Messina
Mon Jul 12, 2021 10:18 am
Forum: General
Topic: Assistance needed with 18F27Q10 Sector Writes
Replies: 5
Views: 85

Re: Assistance needed with 18F27Q10 Sector Writes

The datasheet is clearly very misleading, if not downright just incorrect, with its inclusion of the use of TBLPTR for the sector writes. I agree, it is confusing. I think if you're only writing a byte or two then using the TBLPTR method to load the write latches is probably simpler. The thing that...
by Jerry Messina
Sun Jul 11, 2021 3:47 pm
Forum: Wiki Announcements
Topic: PPS Tool v0.0.6.3
Replies: 0
Views: 29

PPS Tool v0.0.6.3

There's a new version of the PPS Tool available, V0.0.6.3 https://www.sfcompiler.co.uk/wiki/pmwiki.php?n=SwordfishUser.PPSTool This version has code to deal with some of the errors/omissions in the MCC xml files for the 18FxxQ40 and Q41 family, enhancements for the J series, and adds support for 18F...
by Jerry Messina
Sun Jul 11, 2021 3:39 pm
Forum: General
Topic: Assistance needed with 18F27Q10 Sector Writes
Replies: 5
Views: 85

Re: Assistance needed with 18F27Q10 Sector Writes

Here's an example using the buffer ram to work with pfm sectors. Supposedly you can use the TABLEPTR to load the ram too, but it just seems to make more sense to me to use it as ram since that's where it's located. On the Q10 the buffer ram is a 256-byte block reserved for nvm sector operations. You...
by Jerry Messina
Sun Jul 11, 2021 12:01 am
Forum: General
Topic: Assistance needed with 18F27Q10 Sector Writes
Replies: 5
Views: 85

Re: Assistance needed with 18F27Q10 Sector Writes

Hi Bernard, I think in order to use the sector write commands you need to use the special Buffer Ram locations, which you can find the address of in the 18F27Q10.bas device file... #define _nvm_bufferram_start = $0D00 // nvm buffer ram start address #define _nvm_bufferram_end = $0DFF // nvm buffer r...
by Jerry Messina
Wed Apr 21, 2021 1:02 pm
Forum: Modules
Topic: I2C SCANNER
Replies: 13
Views: 756

Re: I2C SCANNER

I had done the same thing and the compiler said error... The compiler hates me because of all the sloppy & incorrect code that I feed it.... But I would choose it again over the others! Here's a tip - when you get compilation errors they're listed in the results window "last to first". Scroll down ...
by Jerry Messina
Wed Apr 21, 2021 12:46 pm
Forum: Modules
Topic: I2C SCANNER
Replies: 13
Views: 756

Re: I2C SCANNER

IS Z = Z >> 3 VALID Yes, it's valid. The following compiles fine for me: dim Z as byte Z = Z >> 3 Maybe there was something else it was really complaining about? DO #option DIGITALIO_INIT = true AND SetAllDigital() ACCOMPLISH THE SAME RESULT? If you look at the last page of the library file SetDigi...
by Jerry Messina
Tue Apr 20, 2021 10:50 am
Forum: Modules
Topic: I2C SCANNER
Replies: 13
Views: 756

Re: I2C SCANNER

For the left-shift (<<) and right-shift (>>) operators, the syntax is: variable_to_shift SHIFT_OP number_of_times_to_shift For example: A = B >> 1 means : shift 'B' right 1 time and assign the result to 'A' The variable 'B' itself is not modified as a result of doing the shift. If you use it as a pa...
by Jerry Messina
Tue Apr 20, 2021 12:02 am
Forum: Modules
Topic: I2C SCANNER
Replies: 13
Views: 756

Re: I2C SCANNER

That's what I get for not trying something before posting it. The for loop For addr = 128 To 254 Step 2 won't work very well since 'addr' is a byte. On the last loop it'll try to increment it: addr = 254 + 2 = 256, which gets truncated to 0 since it's a byte I think the best/clearest code is probabl...
by Jerry Messina
Mon Apr 19, 2021 11:04 pm
Forum: Modules
Topic: I2C SCANNER
Replies: 13
Views: 756

Re: I2C SCANNER

The INA219 may be ok... once you change the loop to scan more addresses you should see it show up at 0 and $80 (128).
We weren't scanning far enough at first to see it in both places.
by Jerry Messina
Mon Apr 19, 2021 1:46 pm
Forum: Modules
Topic: I2C SCANNER
Replies: 13
Views: 756

Re: I2C SCANNER

I just noticed this. If you want to scan the entire address range, the 'for' loop needs to be: for addr = 0 to 127 if (I2C2.IsPresent(addr<<1)) then // device found else // not found endif That scans all even address bytes from 0 to 254 ($FE), which covers the 7-bit addresses 0 to 127. Stopping at 1...