Search found 1473 matches
- Mon Mar 21, 2011 8:23 pm
- Forum: Modules
- Topic: SD Module Pin assignments
- Replies: 13
- Views: 8985
Do I need to explicitly disable ALL interrupts from the top down, before calling SD routines? Do the SD routines use interrupt vectors? I'm wondering why you asked. I wouldn't think so. The SD routines don't use interrupts. I asked because it's very easy to forget about context saving and associate...
- Mon Mar 21, 2011 3:16 pm
- Forum: Compiler
- Topic: conditional 'include' error?
- Replies: 1
- Views: 2070
conditional 'include' error?
While I was trying to help Jason in this thread http://www.sfcompiler.co.uk/forum/viewtopic.php?p=7981#7981 I ran across some unexpected errors with trying to use different options that I can't explain. I've condensed it down a bit using the following mcp1.bas module MCP1 // hardware or software SPI...
- Mon Mar 21, 2011 2:44 pm
- Forum: Compiler
- Topic: Can SSPI and SPI be run in parallel?
- Replies: 9
- Views: 4868
If you were going to extend this for more devices, it might make more sense to use a single module and just add in support for it to use multiple chip selects, perhaps controlled via the 'address' byte, so $00-$07 --> CS1, $10-$17 --> CS2, etc. It kept gettting stuck when compiling it at a Writebyte...
- Sun Mar 20, 2011 5:10 pm
- Forum: Compiler
- Topic: Can SSPI and SPI be run in parallel?
- Replies: 9
- Views: 4868
- Sun Mar 20, 2011 3:25 pm
- Forum: Compiler
- Topic: Can SSPI and SPI be run in parallel?
- Replies: 9
- Views: 4868
One thing I've noticed is that the file MCP23S17_MULT.bas calls a routine named 'EnableSPI()', but that sub isn't in my copy of SPI.bas. If you open SPI.bas, you'll see that routine referenced in the comments at the top. To add it, open SPI.bas and add the following to the end Public Sub EnableSPI()...
- Fri Mar 18, 2011 7:26 pm
- Forum: User Modules
- Topic: Interrupts
- Replies: 21
- Views: 10537
When you type in a terminal emulator, each character you type is a byte. Typing the two characters "FE" sends two bytes... ASCII "F" ($46) and ASCII "E" ($45). Before you changed things, when you had Send: FE1F0002FE1F0004FE1F0008 Get: FE1F0002FE1FByte Count Value Is 12 0004FE1F0008Byte Count Value ...
- Fri Mar 18, 2011 2:04 pm
- Forum: User Modules
- Topic: Interrupts
- Replies: 21
- Views: 10537
It looks like you renamed the modified USART.BAS file to USARTM.BAS. There's a potential problem with that... ISRRX needs to be able to see it as well (it includes USART.BAS too), and it won't find the right one if it's renamed. Change the name back to USART.BAS. Either put it in your project folder...
- Fri Mar 18, 2011 12:59 pm
- Forum: User Modules
- Topic: Interrupts
- Replies: 21
- Views: 10537
- Thu Mar 17, 2011 5:19 pm
- Forum: User Modules
- Topic: Interrupts
- Replies: 21
- Views: 10537
It does to a certain extent, but not completely. The decision to use 16-bit mode and the high speed baud rate is left to the user, and for some really slow rates at faster clocks, it's not really an option. In my experience, your almost always better off using the 16-bit BRG with BRGH=1 (so set both...
- Thu Mar 17, 2011 2:46 pm
- Forum: User Modules
- Topic: Interrupts
- Replies: 21
- Views: 10537
First off, when I showed the example of how to set the interrupt priorities, I should have been more clear that it was an example only. Remove this from your code Interrupt OnTimer1(ipLow) // code statements here End Interrupt Interrupt OnTimer3(ipHigh) // code statements here End Interrupt Now, as ...
- Wed Mar 16, 2011 5:50 pm
- Forum: User Modules
- Topic: Interrupts
- Replies: 21
- Views: 10537
You're mixing up events and ISR's. A good read of the manual sections on those topics might help ( http://www.sfcompiler.co.uk/downloads/SFManual.pdf ). Events are typically used as a way to extend the function of an isr without having to modify the original module code. They're a form of indirect s...
- Wed Mar 16, 2011 1:39 pm
- Forum: Compiler
- Topic: 18F67J60 and an LCD problem
- Replies: 2
- Views: 2377
- Tue Mar 15, 2011 6:35 pm
- Forum: User Modules
- Topic: Interrupts
- Replies: 21
- Views: 10537
I thought you were pretty close before, but since you've changed horses... The 18F supports two interrupt priority levels, high and low. By default, if you're only using one you don't have to do anything. If you have two priority levels, you have to assign the priorities in the ISR declaration somet...
- Mon Mar 14, 2011 5:47 pm
- Forum: User Modules
- Topic: UART TOOL
- Replies: 23
- Views: 11108
In addition to what Jon's pointed out... You have to have any '#option' statements BEFORE the module is included, so change it to #option TIMER_PRIORITY = ipLow #option TIMER_AUTO_RELOAD = true Include "ISRTimer.bas" Include "utils.bas" The parameter for Timer.Initialize() is the total number of tim...
- Mon Mar 14, 2011 2:35 pm
- Forum: User Modules
- Topic: UART TOOL
- Replies: 23
- Views: 11108
You can also setup a timer to free run and just use a polling method. This works best if you set the timer to work in 16-bit mode. TMR0 gives the longest duration since it has a 1:256 prescaler, but it also works with timers 1 and 3 (but they only have a 1:8 prescaler). Using this method you can hav...