Search found 152 matches
- 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...
- 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...
- 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:
Doh!
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)
- 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_...
- Fri Sep 09, 2011 1:53 pm
- Forum: User Modules
- Topic: SD.Rename irrational behaviour with high memory
- Replies: 11
- Views: 5815
- 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...
- 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...
- 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...
- Tue Aug 30, 2011 3:09 pm
- Forum: User Modules
- Topic: SD.Rename irrational behaviour with high memory
- Replies: 11
- Views: 5815
- 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...
- 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...
- Fri Jul 01, 2011 3:03 pm
- Forum: Compiler
- Topic: GetTris fails on PORTJ on 18F87J50
- Replies: 3
- Views: 2437
- 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) ... ...
- Wed May 04, 2011 10:57 am
- Forum: Modules
- Topic: new USB v1.4 module (with SF HID bootloader)
- Replies: 11
- Views: 8143
- 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...