Search found 219 matches
- Thu Oct 01, 2015 7:35 am
- Forum: Compiler
- Topic: How are consts allocated a type?
- Replies: 3
- Views: 2553
How are consts allocated a type?
Is there a 'rule' as to what type / size the compiler allocates to consts where a type is not specifically declared? By chance in a recent program I found that the compiler was assigning a non-byte type to a const which was given a value well within the range of a byte and which was only used in exp...
- Mon Sep 21, 2015 3:00 pm
- Forum: Compiler
- Topic: Floating point representation and sharing
- Replies: 2
- Views: 2196
Re: Floating point representation and sharing
it will be RS485 all the way so I can go to a text-based transmission but that isn't that compatible with SPI. Could you expand on that? Why can't you transfer ASCII data via SPI? Thanks, Jerry, I'll give that a go. As for SPI, I should have said that it seems awkward to handle variable length stri...
- Mon Sep 21, 2015 9:46 am
- Forum: Compiler
- Topic: Floating point representation and sharing
- Replies: 2
- Views: 2196
Floating point representation and sharing
I'm developing an application, part of which will be a bridge between a PIC which controls a heater and an ARM-based system. I need to pass various data to the ARM-based system which includes floating point numbers. From what I have found Swordfish uses a proprietary floating-point format. Is there ...
- Wed Sep 16, 2015 3:44 pm
- Forum: Compiler
- Topic: Library location
- Replies: 9
- Views: 3790
Re: Library location
What links do I need to be looking for? The only ones I can find appear to be local, not networked links or junctions. I've got junction points for: C:\Users\shughes\My Documents which points to C:\Users\shughes\Documents C:\Documents and Settings points to C:\Users Also Users\Admin and Users\Defaul...
- Wed Sep 16, 2015 3:38 pm
- Forum: Compiler
- Topic: Library location
- Replies: 9
- Views: 3790
Re: Library location
I've got a C:\Users\shughes\Documents folder but it doesn't seem to map to My Documents. When I did the link to My Documents it created the Swordfish folder in this directory. (I'm getting confused as to why but believe me that is what happened!) However, it doesn't appear when I navigate to Documen...
- Wed Sep 16, 2015 3:13 pm
- Forum: Compiler
- Topic: Library location
- Replies: 9
- Views: 3790
Re: Library location
I tried that but no joy. I can't actually work out where I should be redirecting to. If I use 'Users\shughes\My Documents\Swordfish' it creates a link but in the wrong place. I try 'Documents' or 'Libraries/Documents' I get a 'no such location' (or similar) error message. If I navigate to the folder...
- Wed Sep 16, 2015 2:43 pm
- Forum: Compiler
- Topic: Library location
- Replies: 9
- Views: 3790
Re: Library location
It looks like that doesn't work for me as the My Documents folder is already a symbolic link to a network location...
Now I think about it I remember that David was very unwilling to make this change for some reason so it looks like I'm stuck with excessively long compile times....
Now I think about it I remember that David was very unwilling to make this change for some reason so it looks like I'm stuck with excessively long compile times....
- Wed Sep 16, 2015 1:39 pm
- Forum: Compiler
- Topic: Library location
- Replies: 9
- Views: 3790
Library location
Can someone please remind me how to change the location of the libraries Swordfish uses? Both default and user libraries. I've recently found that our network is basically crippling the compiler - something that takes 75 seconds to compile using the standard setup takes less than 8 seconds if I move...
- Mon Aug 17, 2015 7:43 am
- Forum: General
- Topic: Generating phase-angle control signals
- Replies: 1
- Views: 3277
Generating phase-angle control signals
I'm developing a system which phase-angle controls the input to a transformer and was wondering if I could take advantage of the various PIC peripherals to take some (or all!) of the load off the processor in doing this. Basically, I have a pulse input from a zero-cross detector and need to generate...
- Wed Jul 08, 2015 9:55 am
- Forum: General
- Topic: Odd Sleep operation
- Replies: 11
- Views: 6076
Re: Odd Sleep operation
Eventually got a reply back from Microchip. They can't recreate it... The code sample they sent me indicates they've not understood the issue. They asked for a code sample that shows the issue despite me having already sent one. They they marked the issue as resolved. It's a good thing there are ple...
- Mon Jun 29, 2015 1:11 pm
- Forum: Compiler
- Topic: Interrupt Advice
- Replies: 11
- Views: 4929
Re: Interrupt Advice
From what I can see these F... references are unique to the ISR. I guess the best idea would be to try and complete development then see if it is safe to disable saving the system variables as that way you are less likely to change something at a later date which breaks it? At the system I'm working...
- Mon Jun 29, 2015 11:06 am
- Forum: Compiler
- Topic: Interrupt Advice
- Replies: 11
- Views: 4929
Re: Interrupt Advice
OK, maybe I should avoid posting before lunchtime on a Monday! You are right, Jerry, it is there when you look. I was expecting MOVFF-type instructions to save them, I forgot about the FSR trick. When you mention 'calls in the ISR' do you mean sub / function calls? I was always taught never to call ...
- Mon Jun 29, 2015 8:09 am
- Forum: Compiler
- Topic: Interrupt Advice
- Replies: 11
- Views: 4929
Re: Interrupt Advice
Hope it's OK to butt in on this, I've got a query from what you've written, Jerry. I'm not sure why but from somewhere I've got this usage of the Save command: Save(0,FSR0,FSR1) Firstly, am I right in thinking that is a bit of a pointless usage of the command as it saves FSR0 and FSR1 anyway when yo...
- Wed Jun 17, 2015 1:03 pm
- Forum: Compiler
- Topic: Clearing interrupt-on-change
- Replies: 6
- Views: 2889
Re: Clearing interrupt-on-change
Hard to tell how accurate the datasheet is on this topic but it says: [quote]except when PORTB is the source or destination of a MOVFF instruction[/quote] The datasheet (18F26K22) also status there must be at least one instruction execution between reading/writing the port and clearing the flag whic...
- Wed Jun 17, 2015 11:46 am
- Forum: Compiler
- Topic: Clearing interrupt-on-change
- Replies: 6
- Views: 2889
Re: Clearing interrupt-on-change
Hmmm... That basically means you can't use the rest of port B if you use IoC so have at least 4 wasted pins... I wonder if use of MOVFF could be a work-around for this? I don't know if the reason not to use it to clear the interrupt is because it doesn't update the mismatches or something else, but ...