Once I think of it in terms of ports and pins, it does. I was thinking of it more as a single #option entry.
Thanks for the explanation.
Search found 1469 matches
- Sun Oct 23, 2011 11:52 am
- Forum: Compiler
- Topic: Confused by #option statements
- Replies: 4
- Views: 2678
- Sun Oct 23, 2011 11:44 am
- Forum: User Modules
- Topic: Composite USB device support
- Replies: 9
- Views: 5507
Thanks for all the input so far. I've been use HID more often too, so I'll make sure it stays reasonable to use. I'm thinking most of the changes can be optional, so hopefully no real impact if you don't want/need them. As far as Mass storage goes, what kind of storage would folks like to see? SD ca...
- Sun Oct 23, 2011 11:11 am
- Forum: Compiler
- Topic: Confused by #option statements
- Replies: 4
- Views: 2678
>>What happens is the option is looking to 'bind' itself the first PORT (and in this case, PIN) it sees Is it looking for a PORT and a PIN because of the way the option is used? >>I think you could argue this is a logic error with the compiler. Well, that's what I thought, but you're certainly a lot...
- Sat Oct 22, 2011 1:42 pm
- Forum: Compiler
- Topic: Confused by #option statements
- Replies: 4
- Views: 2678
Confused by #option statements
I was looking through LCD.bas, and wanted to check how some of the '#option' statements work when it comes to using #options, pins, and ports. I ended up with the following... #option LCD_DATA = PORTC // override the following option (no pin) #option LCD_DATA = PORTB.4 #if IsOption(LCD_DATA) #if not...
- Thu Oct 20, 2011 8:56 pm
- Forum: Compiler
- Topic: MPLAB 8.80/MPASM 5.43 released
- Replies: 1
- Views: 2180
MPLAB 8.80/MPASM 5.43 released
Just a heads up. Microchip has released MPLAB 8.80 and MPASM 5.43. Nothing of note for the 18F series... no real changes/no new devices. About the only difference in the device files is that they have defined a few new symbols for some of the timer register addresses: TMR0, TMR1, TMR3, TMR5 and TMR7...
- Fri Oct 14, 2011 3:35 pm
- Forum: User Modules
- Topic: Composite USB device support
- Replies: 9
- Views: 5507
Ryan - There's a USB bootloader in the current package. It's a HID bootloader based on the ones from the Microchip libraries... I just combined all the different source packages into one and ported it over to SF so that you don't have to use C18 in case you have to make changes for your chip. You ca...
- Thu Oct 13, 2011 5:17 pm
- Forum: General
- Topic: Proteus simulations and muti-processors?
- Replies: 3
- Views: 2950
Proteus simulations and muti-processors?
I have a board with multiple pics communicating over an I2C bus, and I'm looking for a good way of debugging, esp. the uC communications end of things. I can do this using MPLAB and multiple pickits, but that ends up being pretty tedious, and it's not practical for more that two chips or so. More th...
- Wed Oct 12, 2011 11:15 am
- Forum: User Modules
- Topic: Composite USB device support
- Replies: 9
- Views: 5507
Composite USB device support
I recently needed a USB device that supported both HID and CDC classes (known as a "composite device"). While it ended up "doable" with the current USBv14 library, there were a number of changes I had to make to both the HID and CDC files to get it to work, and it's a bit of a kludge. I've been thin...
- Mon Oct 10, 2011 2:07 pm
- Forum: Compiler
- Topic: newbie trying to float
- Replies: 4
- Views: 2941
The square root of 10e6 is 3162,2776601684...Math.bas returns 3162.7783 That doesn't surprise me. I suppose that's due to the algorithm used and the number of digits req'd. Errors can creep up fairly quickly with single-precision math. Why Low High? I would have thought the opposite more logical Be...
- Fri Oct 07, 2011 10:30 am
- Forum: Compiler
- Topic: newbie trying to float
- Replies: 4
- Views: 2941
I'm not a big fan of using floating-point math, especially on small 8-bit uC's, but to cut to the chase here's a sample of what you asked. SF uses the same 32-bit single-precision float format that Microchip does, so it's good for about 7 digits of precision or so. The results are in the comments, a...
- Tue Sep 27, 2011 10:42 am
- Forum: Compiler
- Topic: ADC on Pic18F4550 Not Working <<N00B>>
- Replies: 6
- Views: 3741
Now that you have the ADC in the mix, you may need some additional changes. I assume that you're using the SE version, but the changes apply to either. First, the 18F4550.bas system file needs to have a change for the ADC. Double click on the 18F4550.bas in the Code Explorer window. Above the edit w...
- Fri Sep 23, 2011 4:59 pm
- Forum: User Modules
- Topic: Peripheral Pin Select Module
- Replies: 3
- Views: 6083
Peripheral Pin Select Module
If anyone's using the PPS module I posted in the thread http://www.sfcompiler.co.uk/forum/viewtopic.php?t=1459 , I've updated the code and posted it on the wiki under the User Modules ( http://www.sfcompiler.co.uk/wiki/pmwiki.php?n=SwordfishUser.PeripheralPinSelect ) The revised code is smaller, som...
- Tue Sep 20, 2011 9:48 am
- Forum: Modules
- Topic: Multiple Software I2C
- Replies: 6
- Views: 5185
- Sun Sep 18, 2011 9:57 am
- Forum: Modules
- Topic: Multiple Software I2C
- Replies: 6
- Views: 5185
If you don't want to use the hardware solution then option 3 would be my choice. All it takes is about 30 seconds of editing to change the module name and the '#option I2C_SCL/I2C_SCA' statements and you're done. There'd be a lot more work involved getting option 2 to work, and you'd probably end up...
- Fri Sep 16, 2011 1:36 pm
- Forum: Compiler
- Topic: Interrupt on change help
- Replies: 6
- Views: 3431
Also, if you want the edge-triggered INT0 to act more like the InterruptOnChange pins, you can change the edge in the isr... interrupt IsrHi() if ((INT0IF=1) and (INT0IE=1)) then ' do whatever... check pin, change INTEDG, etc ' here, we read the pin and flip the edge interrupt if (PORTB.0 = 1) then ...