Search found 1469 matches

by Jerry Messina
Sat Mar 26, 2011 9:18 pm
Forum: Compiler
Topic: K22 ASM errors
Replies: 13
Views: 7902

Francis,

MPASM, not MPLAB. I can't remember which versions of MPASM come with what verions of MPLAB.

I've run across that error before, but at the moment I can't recall what it was. "Processor type undefined" is usually an MPASM version mismatch.
by Jerry Messina
Sat Mar 26, 2011 6:26 pm
Forum: Compiler
Topic: K22 ASM errors
Replies: 13
Views: 7902

I have the latest MPLAB.
What version of MPASM are you using? If you just run mpasmwin.exe, it should say.
by Jerry Messina
Sat Mar 26, 2011 10:44 am
Forum: Compiler
Topic: USART strange results
Replies: 9
Views: 4949

The 16-bit BRG usually lets you get a lot more accurate baudrate. In some cases, it's not really an option because the combination of cpu clock and desired rate exceeds what the 8-bit one can do.

Usually, setting both those options gives the best result.

Glad you're up and running!

Jerry
by Jerry Messina
Sat Mar 26, 2011 9:39 am
Forum: Compiler
Topic: USART strange results
Replies: 9
Views: 4949

Keep in mind that the "clock = " statement doesn't actually setup anything hardware-wise... it's purely so the compiler can know what speed you're running at so it can adjust software delays, timers, etc. It should be set to whatever freq you're actually running at, so if using the 4xPLL it'd be 64,...
by Jerry Messina
Thu Mar 24, 2011 5:07 pm
Forum: User Modules
Topic: ISRRX Goes Away
Replies: 8
Views: 4423

4800 baud is ~2ms/byte, so a 14 byte message takes 28ms to transfer. Even at 8MHz (500ns/instruction), that's a boatload of time before you have to worry about things overrunning/overflowing unless you have added something to the ISRRX OnDataEvent that takes a long time (>2ms) to execute. As long as...
by Jerry Messina
Thu Mar 24, 2011 2:50 pm
Forum: User Modules
Topic: ISRRX Goes Away
Replies: 8
Views: 4423

If that's the case then I doubt what I said is the issue. As soon as the interrupt handler in ISRRX sees one too many characters, it sets the BufferOverrun flag and that should be caught by the ISRRX.Overrun() routine. If you wanted to flush the buffer, you can enable the commented out ISRRX.Reset y...
by Jerry Messina
Thu Mar 24, 2011 2:30 pm
Forum: User Modules
Topic: ISRRX Goes Away
Replies: 8
Views: 4423

I don't know if you're running into the situation I described or not, but it would only happen under some very specific circumstances, like you get exactly RX_BUFFER_SIZE number of characters come in without reading anything. Couple that with the fact that a lot of folks don't even seem to use ISRRX...
by Jerry Messina
Thu Mar 24, 2011 2:02 pm
Forum: Compiler
Topic: SystemConvert and _maxram
Replies: 4
Views: 2540

I've been playing around with the USB library, and since you originally wrote that a number of things have changed. It seems every time Mchip introduces a new USB chip, they change the way it works, and the various "hacks" are getting hard to consolidate. With the advent of the "J" and "K" series, t...
by Jerry Messina
Thu Mar 24, 2011 1:38 pm
Forum: Compiler
Topic: SystemConvert and _maxram
Replies: 4
Views: 2540

Let me ask this then (I'm pretty sure I already know the answer, but just in case).

Is there any '#option' or '#variable' setting that would let me exclude an arbitrary ram memory region from the compilers allocation scheme, sort of like a 'reserve_ram' setting?
by Jerry Messina
Thu Mar 24, 2011 1:21 pm
Forum: User Modules
Topic: ISRRX Goes Away
Replies: 8
Views: 4423

It looks like there may be a flaw in the buffer index handling. If you get exactly RX_BUFFER_SIZE number of characters come in without reading any of them, you're left with the situation FIndexIn = FIndexOut and the FMaybeOverrun flag set. In this condition, the buffer is full (but hasn't overflowed...
by Jerry Messina
Thu Mar 24, 2011 11:41 am
Forum: Compiler
Topic: SystemConvert and _maxram
Replies: 4
Views: 2540

SystemConvert and _maxram

I'm curious. How does SystemConvert determine the '#variable _maxram' setting? Or even the '_ram_banks'? I always thought that you used the *.dev and asm *.inc files to gather up the info, but I don't see any way to tell from those files. Are you parsing the .PIC files? One of the reasons I'm asking...
by Jerry Messina
Mon Mar 21, 2011 8:23 pm
Forum: Modules
Topic: SD Module Pin assignments
Replies: 13
Views: 8972

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...
by Jerry Messina
Mon Mar 21, 2011 3:16 pm
Forum: Compiler
Topic: conditional 'include' error?
Replies: 1
Views: 2067

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...
by Jerry Messina
Mon Mar 21, 2011 2:44 pm
Forum: Compiler
Topic: Can SSPI and SPI be run in parallel?
Replies: 9
Views: 4861

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...
by Jerry Messina
Sun Mar 20, 2011 5:10 pm
Forum: Compiler
Topic: Can SSPI and SPI be run in parallel?
Replies: 9
Views: 4861

yes, they'll both use the hardware SPI module. The only restriction is that you can't use the routines in an interrupt since they share the same SPI hardware.

You'd have to make a few more changes to the various "#option"s if you wanted them to be different (ie one hardware, one software)