Search found 1469 matches

by Jerry Messina
Tue Apr 26, 2011 10:53 am
Forum: Modules
Topic: How To Read HID Report?
Replies: 4
Views: 4110

That dll makes a lot of assumptions. The problem with transferring anything but single 8-bit unsigned bytes between two systems is that the data representation may not be the same on both ends, and it's machine and language dependant. What's an 'integer' on your host system? 16 bits? 32 bits? Is it ...
by Jerry Messina
Fri Apr 22, 2011 11:41 am
Forum: Compiler
Topic: Does SF ever set TBLPTRU?
Replies: 0
Views: 3036

Does SF ever set TBLPTRU?

Is the TBLPTRU register ever set or initialized? I realize that SF doesn't have support for a 24-bit data type (which is really what the TBLPTRU/TBLPTRH/TBLPTRL register set is), and does table accesses using a 16-bit address. There's the following alias in the device .bas files... public dim TABLEP...
by Jerry Messina
Wed Apr 20, 2011 8:06 pm
Forum: Compiler
Topic: MPLAB 8.66/MPASM 5.40 released
Replies: 1
Views: 2362

Nix what I said in that last post. I've had a support ticket open for almost a month now about this, but it seems I was given bogus information about the 18F66K80 family. They just released an errata to the datasheet, and supposedly it's the DATASHEET that was wrong, so the include files in MPLAB 8....
by Jerry Messina
Wed Apr 20, 2011 6:49 pm
Forum: Compiler
Topic: setting User ID locations?
Replies: 1
Views: 2019

This might be a bit of a kludge, but it seems you can use an asm block to get absolute data into the hex file at a particular location macro InitUserID() asm cur_loc set $ ; record current program address org 0x200000 ; point to the UserID area db 0x5a,"1",0x20,0x30,40h,50h,60,"7" ; eight bytes of u...
by Jerry Messina
Tue Apr 19, 2011 8:49 am
Forum: Compiler
Topic: setting User ID locations?
Replies: 1
Views: 2019

setting User ID locations?

Is there anyway to generate initialization data for the User ID locations (the eight bytes @ 200000h-200007h) like you can for the eeprom and config areas?

I know how to read and write them at runtime, but I'm looking for a way to set the data in the hex file.
by Jerry Messina
Sun Apr 17, 2011 2:06 pm
Forum: Modules
Topic: config WDT vs WDTEN
Replies: 4
Views: 4723

I just noticed that system.bas has a conditional compile... public inline sub ClrWDT() #if (WDT) asm ClrWDT end asm #endif end sub This will result in the sub being completely optimized away if you have "#option WDT = false". While that can save a few bytes here and there, it might be a lot less dan...
by Jerry Messina
Sun Apr 17, 2011 12:08 pm
Forum: Modules
Topic: config WDT vs WDTEN
Replies: 4
Views: 4723

I don't know about "always", but for the last few versions SF checks the following locations for 'include' files (and in this order): - the current project folder - the <swordfish install>/UserLibrary folder - and finally <swordfish install>/Library folder So, you can override the system libraries o...
by Jerry Messina
Sat Apr 16, 2011 8:04 pm
Forum: Modules
Topic: config WDT vs WDTEN
Replies: 4
Views: 4723

config WDT vs WDTEN

I've been swapping devices back and forth a lot lately, and I kept running afoul of the different names used for the WDT configuration setting. Thanks to Microchip, some devices use 'config WDT' while others use 'config WDTEN', and it's a real pain to keep track of. I finally broke down and wrote re...
by Jerry Messina
Thu Apr 14, 2011 6:15 pm
Forum: Compiler
Topic: CDC and timer interrupt
Replies: 20
Views: 12149

One oddity I found in the Code Explorer window as I add the macros... I just tossed some of that code together, and I see funny things in the Code Explorer as well for the ActivateTimers() and De_activateTimers() routines. I've never noticed that before because I have 'Explore Includes' unchecked i...
by Jerry Messina
Thu Apr 14, 2011 3:23 pm
Forum: Compiler
Topic: CDC and timer interrupt
Replies: 20
Views: 12149

I don't think there's much documented on the new macro facility besides a few forum posts... mostly just some questions to David. http://www.sfcompiler.co.uk/forum/viewtopic.php?t=1308 http://www.sfcompiler.co.uk/forum/viewtopic.php?t=1316 There's nothing about it in the help file yet AFAIK. There's...
by Jerry Messina
Thu Apr 14, 2011 2:24 pm
Forum: Compiler
Topic: CDC and timer interrupt
Replies: 20
Views: 12149

I've followed that on and off (mostly off since it's for PDS), but I really didn't want to get into the whole PC app end of things... it just adds too much support effort. Mchip's HIDBootLoader.exe isn't the greatest of apps, but it seems workable, supports all the chips, comes with source code, and...
by Jerry Messina
Thu Apr 14, 2011 2:02 pm
Forum: Compiler
Topic: CDC and timer interrupt
Replies: 20
Views: 12149

RangerBob, I wouldn't call what you've done hacked at all! It's very well done, and easy to follow. All I've done (other than a few bug fixes) is to try and consolidate all the work everyone else did, and add support for all the missing chips at the same time. I've added a new module or two to hold ...
by Jerry Messina
Thu Apr 14, 2011 1:09 pm
Forum: Compiler
Topic: CDC and timer interrupt
Replies: 20
Views: 12149

Thanks. I should probably explain a little more about using the timers in 16-bit mode, and why it would appear to work if you're using something like dim TMR0 as TMR0L.AsWord TMR0 = TimerValue ' Re-load Timer 0 That code will write TMR0L then TMR0H, at least in the current version of SF. To properly...
by Jerry Messina
Thu Apr 14, 2011 9:27 am
Forum: Compiler
Topic: CDC and timer interrupt
Replies: 20
Views: 12149

My Timer0 seems to load the 16 bit word without any problems, not sure why but I am not going to change it Actually it's not, but depending on what value you're loading into the timer it may look like it's working and you may not notice. In 16-bit mode, the value written into TMRH goes into a holdi...
by Jerry Messina
Wed Apr 13, 2011 5:37 pm
Forum: Compiler
Topic: CDC and timer interrupt
Replies: 20
Views: 12149

Also, I just noticed you're using the timer in 16-bit mode. If you have something like the following dim TMR0 as TMR0L.AsWord TMR0 = TimerValue ' Re-load Timer 0 That won't load the 16-bit timer correctly. The two 8-bit TMR0L and TMR0H registers must be written in the order TMR0H and then TMR0L. I u...