Search found 152 matches

by RangerBob
Mon Oct 24, 2011 9:53 am
Forum: Compiler
Topic: Low Voltage Detect Code
Replies: 4
Views: 3683

Hello Jason, I use it a lot for controlling external battery switching, heres some excepts that may be of use to you. The CtlEXt and CtlBatt are the control lines to the battery switches. The interrupt fires to switch the system from ext to battery, the switch back (not shown here) actually occurs o...
by RangerBob
Tue Oct 04, 2011 9:02 am
Forum: General
Topic: USB Stickalike
Replies: 2
Views: 3514

No-one has done this on swordfish to my knowledge. I briefly looked at porting the Microchip MSD (Mass Storage Device) to swordfish a while back but then decided to use the Microchip Libraries themselves as the base of my design. Get the Microchip Application Library (MAL) and have a poke through at...
by RangerBob
Thu Sep 15, 2011 4:06 pm
Forum: Compiler
Topic: Const within Const
Replies: 1
Views: 1747

Idiot me. Seconds after posting this message I realised what the issue was. Serves me right for posting at the end of the day.

Of course the solution is to properly dimension the FREQB const as follows:

Code: Select all

Const FREQB As Word = 0 - ((4000 * FA1 * FA0 - 400 * MRF_DEFAULT_FREQ) / FA1)
Doh!
by RangerBob
Thu Sep 15, 2011 4:01 pm
Forum: Compiler
Topic: Const within Const
Replies: 1
Views: 1747

Const within Const

Hello all, Stupid question time again, but I cannot see how I can get the following to work. I have a Const I want to calculate at compile time, then use in a later const as thus: ... Const FREQB = 0 - ((4000 * FA1 * FA0 - 400 * MRF_DEFAULT_FREQ) / FA1) ... Const MRF_CFSREG = $A000, Const MRF_FREQB_...
by RangerBob
Fri Sep 09, 2011 1:53 pm
Forum: User Modules
Topic: SD.Rename irrational behaviour with high memory
Replies: 11
Views: 5815

Just to round out this topic. The issue appears to have been resolved by David in the latest Beta, so again, many thanks to David and Jerry for their prompt assistance!

Regards,

Nathan
by RangerBob
Fri Sep 02, 2011 9:42 am
Forum: User Modules
Topic: SD.Rename irrational behaviour with high memory
Replies: 11
Views: 5815

Had a play around and have found that the String rename issue as described is broken, even if RAM allocation is in handled automatically, using a cut down (SD only, no USB, no display, no absolute declarations etc.) sample application on the 18F87J50 (885 Variables used from possible 3936). I cannot...
by RangerBob
Wed Aug 31, 2011 3:42 pm
Forum: User Modules
Topic: SD.Rename irrational behaviour with high memory
Replies: 11
Views: 5815

Correct. pNewName has no effect, string or TSDName is fine. If pOldName is TSDName structure, again, no issue. If pOldName is a string the rename function always fails saying errNotFound. I've got SD_MAX_FILES set to 2 so I shouldn't be running into the SFR's and I would have thought everything woul...
by RangerBob
Wed Aug 31, 2011 2:32 pm
Forum: User Modules
Topic: SD.Rename irrational behaviour with high memory
Replies: 11
Views: 5815

Very high. 991 from 1024. Plus I'm cheating by manually placing the SD buffers above RAM BANK 7, Shared at $0C00 and StoredFiles from $0E00, both above the Swordfish "conventional 1k" memory and the USB buffers (using "Absolute"). Another big buffer is at $0800, so they arn't included in the 1k calc...
by RangerBob
Tue Aug 30, 2011 3:09 pm
Forum: User Modules
Topic: SD.Rename irrational behaviour with high memory
Replies: 11
Views: 5815

Ah, yeah sorry, left that debug line in by accident. If its not there, things still are not working right.

Nathan
by RangerBob
Tue Aug 30, 2011 12:52 pm
Forum: User Modules
Topic: SD.Rename irrational behaviour with high memory
Replies: 11
Views: 5815

SD.Rename irrational behaviour with high memory

Hello All, Bit of a long rambling one this one but I was wondering if anyone could shed some light on some odd behaviour. Been using the latest 4.1.4 SD File System lib, and everything seems to be generally working fine except when I attempt to use SD.Rename. I keep getting "errNotFound" as the resp...
by RangerBob
Wed Aug 24, 2011 3:30 pm
Forum: Compiler
Topic: Possible MPASM Issue
Replies: 11
Views: 5432

Gaaaahhhh! :shock: That may explain some real weird swordfish bugs I was encountering when trying to port some code over from a 18F455 to our 18F87J50 platform. Even the simplest code was failing at stupid points, once it got above a certain complexity (typically adding the USB module + display modu...
by RangerBob
Fri Jul 01, 2011 3:03 pm
Forum: Compiler
Topic: GetTris fails on PORTJ on 18F87J50
Replies: 3
Views: 2437

OK, thanks for the fast response David.

Nice to know its not just me doing something dumb on a Friday afternoon then!
by RangerBob
Fri Jul 01, 2011 1:59 pm
Forum: Compiler
Topic: GetTris fails on PORTJ on 18F87J50
Replies: 3
Views: 2437

GetTris fails on PORTJ on 18F87J50

Hello All, Not entirely sure whats going on here but I have a problem around the following code on a 18F87J50: // default module options - user options can override these values... #option GLCD_DATA = PORTJ // data port ... // now create Data TRIS... #option _GLCD_DATA_TRIS = GetTRIS(GLCD_DATA) ... ...
by RangerBob
Wed May 04, 2011 10:57 am
Forum: Modules
Topic: new USB v1.4 module (with SF HID bootloader)
Replies: 11
Views: 8143

Whoa! Great work Jerry, I'll be having a play with these this afternoon too since I've dug out my Demo boards!

Great stuff!

Nathan
by RangerBob
Wed May 04, 2011 10:44 am
Forum: Compiler
Topic: Swordfish + Microchip HID Bootloader
Replies: 12
Views: 11015

Hi Jerry, Yeah, thats pretty much what I knobbled "ClearRegisters.bas" down to in my testing. A much neater solution now is just to add BSR = $00 onto the bottom of your very useful updated "System.bas" and forget "ClearRegisters". Have been testing all morning now, and that certainly seems to be it...