Search found 1470 matches
- Wed Apr 13, 2011 5:37 pm
- Forum: Compiler
- Topic: CDC and timer interrupt
- Replies: 20
- Views: 12150
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...
- Wed Apr 13, 2011 5:18 pm
- Forum: Compiler
- Topic: CDC and timer interrupt
- Replies: 20
- Views: 12150
You don't need to mess with those registers like that. You're effecting a lot of other settings, which you may not want to do if you use a different chip. Enable() and Disable() will take care of the global interrupt enables for you as well as the IPEN bit in RCON, so all you need to do is clear INT...
- Wed Apr 13, 2011 2:54 pm
- Forum: Compiler
- Topic: CDC and timer interrupt
- Replies: 20
- Views: 12150
- Wed Apr 13, 2011 12:45 pm
- Forum: Compiler
- Topic: CDC and timer interrupt
- Replies: 20
- Views: 12150
- Thu Apr 07, 2011 5:23 pm
- Forum: Compiler
- Topic: Has anyone used Peripheral Pin Select to map pins?
- Replies: 10
- Views: 6898
In addition to running SystemConvert to get the new include files, if it helps I did a PPS module for the 46J50 a while back. It needs a few changes for the 47J13, but they're pretty similar... { //------------------------------------------------------------------------------ Name : pps.bas Author :...
- Tue Apr 05, 2011 1:41 pm
- Forum: User Modules
- Topic: Public Variable not visible in Module Routine
- Replies: 4
- Views: 3536
If you want HighTime to be visible to all three modules, a common solution is to create a "globals.bas" file and put the definition in there, and then 'include "globals.bas"' anywhere you need to. If you're coming to SF from other flavors of BASIC, the visibility rules take a little getting used to....
- Tue Apr 05, 2011 1:24 pm
- Forum: User Modules
- Topic: Brown Out Detection
- Replies: 8
- Views: 6001
There's a couple of different ways to access the bits. If you poke around, you'll find a number of them. Here's a summary of a few... #define method = 4 #if (method = 1) // method 1 // absolute bit reference RCON.0 = 1 #elseif (method = 2) // method 2 // bit alias dim BOR as RCON.0 BOR = 1 #elseif (...
- Mon Apr 04, 2011 8:49 pm
- Forum: User Modules
- Topic: Brown Out Detection
- Replies: 8
- Views: 6001
- Mon Apr 04, 2011 1:14 pm
- Forum: User Modules
- Topic: Brown Out Detection
- Replies: 8
- Views: 6001
Those statements are a bit confusing, at least to me. You're right... once you detect one of the events you should set the bit so you can detect future events next time. If you look at Table 5-1 (and the other paragraphs in that section), you'll see that the only event that sets all the RCON bits to...
- Mon Apr 04, 2011 9:39 am
- Forum: User Modules
- Topic: Brown Out Detection
- Replies: 8
- Views: 6001
I think you're misinterpreting the brownout function. If you enable the BOR in the config settings, then when a brownout event occurs the processor will automatically reset. You don't have to do anything else. You can check the bits in RCON at the start of your program to see if any of the various r...
- Wed Mar 30, 2011 11:21 am
- Forum: Compiler
- Topic: MPLAB 8.66/MPASM 5.40 released
- Replies: 1
- Views: 2365
MPLAB 8.66/MPASM 5.40 released
FYI - There's an update to MPLAB available (8.66) that includes the new MPASM 5.40 assembler. There's nothing really new in this version that I can tell... a few more devices now have the DEBUG bit exposed in the CONFIG word. No new 18F devices from what I see over what was in 8.63. There is an issu...
- Tue Mar 29, 2011 9:12 am
- Forum: User Modules
- Topic: Im using SetBaudrate(br2400) but getting 9600?
- Replies: 5
- Views: 3622
Tony, If you're using an external 48MHz clock, you'd be better off changing to "Config FOSC = EC". I don't think you need to change the other options/registers to run w/an external clock... it looks like they default ok. You'd only need to set them up if you had to enable the PLL and dividers. But, ...
- Mon Mar 28, 2011 7:54 pm
- Forum: User Modules
- Topic: How to generate 10KHz to 200KHz with 18F87J50 ?
- Replies: 3
- Views: 2830
- Mon Mar 28, 2011 7:41 pm
- Forum: User Modules
- Topic: Im using SetBaudrate(br2400) but getting 9600?
- Replies: 5
- Views: 3622
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. You have to setup the CONFIG and OSCONx/OSCTUNE registers yourself, however, to actually get th...
- Sun Mar 27, 2011 10:30 am
- Forum: Compiler
- Topic: K22 ASM errors
- Replies: 13
- Views: 7907
The release notes say that it is bundled with MPASM V5.38. The release notes lie. It's not the first time... you can't trust them. MPLAB 8.66 includes MPASM V5.40. At least you've got the right stuff. You have two choices: - copy the required files from the Microchip/MPASM Suite directory into the ...