Search found 1469 matches
- Thu Apr 13, 2023 11:31 am
- Forum: General
- Topic: PIC18F2550 Configuration
- Replies: 15
- Views: 12925
Re: PIC18F2550 Configuration
As you can see, almost I reach the point, only the PORTB6 on a top picture I need to reduce to reach till half value refer to PORTB0 and PORTB1, can you please help, what is should I change to reach half value than both PORTB0 and PORTB1. I'm sorry, but I don't understand the question. I don't use ...
- Wed Apr 12, 2023 11:24 am
- Forum: General
- Topic: PIC18F2550 Configuration
- Replies: 15
- Views: 12925
Re: PIC18F2550 Configuration
'SetAllDigital()' is a subroutine call, so it has to be located after all the variables are declared Device = 18F2550 //uC use Clock = 20 // Use external crystal Config PLLDIV = 5, // Divide by 5 (20 MHz oscillator input) CPUDIV = OSC1_PLL2, // [Primary Oscillator Src: /1][96 MHz PLL Src: /2] USBDIV...
- Tue Apr 11, 2023 10:15 pm
- Forum: General
- Topic: PIC18F2550 Configuration
- Replies: 15
- Views: 12925
Re: PIC18F2550 Configuration
I think your 'while' statement isn't doing what you want. While PORTB = %11111110 LATB.0 = 0 is being evaluated as While (PORTB = %11111110) LATB.0 = 0 If you want to create an infinite loop then change that to While (true) PORTB = %11111110 LATB.0 = 0 ' other statements end while You should be sure...
- Tue Apr 11, 2023 3:18 pm
- Forum: User Modules
- Topic: updated random number generator module
- Replies: 0
- Views: 10781
updated random number generator module
I created an updated version of David Eather's PseudoRandomNumberGenerator. See PseudoRandomNumberGeneratorV2 This is a single file implementation (no copying/renaming/changing code) that supports byte, word, longword, and floats. You simply select the data type of interest using #option RAND_T befo...
- Tue Apr 11, 2023 11:53 am
- Forum: General
- Topic: PIC18F2550 Configuration
- Replies: 15
- Views: 12925
Re: PIC18F2550 Configuration
It looks like you're using examples from another form of BASIC. I would read through the Swordfish language manual, but try this. At least it will compile. The issue wasn't with the config statement, it was with all the other stuff. device = 18F2550 //uC use clock = 20 // Use external crystal config...
- Mon Apr 10, 2023 1:21 pm
- Forum: Modules
- Topic: Question about ISRTimer
- Replies: 5
- Views: 1706
Re: Question about ISRTimer
You might give this a try... I took what you had and added a timeout to the capture() routine. There are some other misc changes and corrections, just look for the 'jm' comments I changed a few variable names just so I could keep track of what was going on (mostly register bit names). { ************...
- Sun Apr 09, 2023 1:33 pm
- Forum: Modules
- Topic: Question about ISRTimer
- Replies: 5
- Views: 1706
Re: Question about ISRTimer
This part here is going to cause problems: INTCON = $C0 ' Enable interupts *** Don't think I need this for the T3Gate if I am polling it **** T3_GIR = true ' Enable Timer1 Gate Mode Interupt I wouldn't recommend directly writing to the INTCON register (that's what the enable()/disable() statements a...
- Sat Apr 08, 2023 12:31 pm
- Forum: Modules
- Topic: Question about ISRTimer
- Replies: 5
- Views: 1706
Re: Question about ISRTimer
Ok, let's look at the whole 'Timer.Items(x)' part first... Each 'timer' (ie 'timer item') gets a data structure allocated to it that contains all the details for that timer // a timer item structure... structure TTimerItem Enabled as boolean Interval as TInterval OnTimer as TEvent #if TIMER_AUTO_REL...
- Tue Mar 28, 2023 6:15 pm
- Forum: Announcements
- Topic: Online update - 28 MAR 2023 - v2.2.4.0
- Replies: 0
- Views: 13016
Online update - 28 MAR 2023 - v2.2.4.0
There is a new compiler update 2.2.4.0 available for registered users. Download: http://www.mecanique-web.co.uk/downloads/swordfish-si.exe and enter your activation key to install. You can view a list of changes here: https://www.sfcompiler.co.uk/wiki/pmwiki.php?n=Swordfish.VersionHistory For the SE...
- Tue Mar 28, 2023 12:11 pm
- Forum: Compiler
- Topic: **IMPORTANT** Optimizations in v2.2.3.8
- Replies: 4
- Views: 1659
Re: **IMPORTANT** Optimizations in v2.2.3.8
check your PM. The ICC v1.2.1.0 update is a separate download for v2.2.3.8 See https://www.sfcompiler.co.uk/wiki/wiki-uploads/SwordfishUser/Modules/sf_update_3_1_2023b.zip ... which is now superseded by the 2.2.4.0 online update, which includes ICC v1.2.1.0 After performing the update to 2.2.4.0 you...
- Mon Mar 27, 2023 12:48 pm
- Forum: Compiler
- Topic: Interrupts and variable saving
- Replies: 13
- Views: 12182
Re: Interrupts and variable saving
I agree. After writing that I realized how complicated a topic it can be, especially for someone not versed in all the details of the 18F. We'll have to see if I can come up with something that helps make sense of it. Since the original question was about the usage of TABLEPTR, I added that to the a...
- Sun Mar 26, 2023 10:44 pm
- Forum: Wiki Announcements
- Topic: New article: Interrupt Context Saving
- Replies: 0
- Views: 28386
New article: Interrupt Context Saving
There's a new wiki article on Interrupt Context Saving in an ISR where I go into depth on the subject.
- Sun Mar 26, 2023 10:41 pm
- Forum: Compiler
- Topic: Interrupts and variable saving
- Replies: 13
- Views: 12182
Re: Interrupts and variable saving
I finally got around to writing something up.
See the wiki article on Interrupt context saving
I think I may try my hand at developing an app to aid in all this, sort of an "ISR Adivsor" tool...
See the wiki article on Interrupt context saving
I think I may try my hand at developing an app to aid in all this, sort of an "ISR Adivsor" tool...
- Fri Mar 24, 2023 10:02 pm
- Forum: Announcements
- Topic: Swordfish ICC V1.2.1.0, Library and Device File Update 3_1_2023 for Swordfish 2.2.3.8
- Replies: 1
- Views: 1694
Re: Swordfish ICC V1.2.1.0, Library and Device File Update 3_1_2023 for Swordfish 2.2.3.8
NOTE: to anyone who downloaded the update prior to today (Mar 24), the zip file for the full version contained the wrong update... it was for the SE version. I have updated the links. It should now download sf_update_3_1_2023b.zip, which contains the proper update file for the full version SF_UPDATE...
- Thu Mar 23, 2023 5:27 pm
- Forum: General
- Topic: Programmer for 18FxxQxx parts
- Replies: 12
- Views: 3256
Re: Programmer for 18FxxQxx parts
You have to have a "clock =" statement so that the compiler knows what freq you're running at, otherwise it assumes 20MHz. Intosc.bas will use the "clock=' and do all the setup and config to match. As long as you don't have the config statements after the "include intosc.bas", it can override any co...