Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Picxie

  1. after writing in Hi-Tech C, will i be able to compile this in sourceboost Try it! if I can not how do I go about changing this If you wrote, surely you can figure out how to change it what do you recommend for a pic 16F87X or perhaps 16F818/819 The choice depends on your hardware design and what else you expect it to do Have a look here http://www.scribd.com/doc/63480088/Pic-877 . There is something so similar its word for word to the code that you wrote.
  2. The red indicates that you have run out of stack depth, ie you have called too many functions from functions. NB last time I looked, this indicator was only valid for PIC16 devices, ie it does not take into account the greater stack depth of PIC18 devices, unless of course, this has been fixed. All is not lost! Sourceboost has the ability to use a software stack, you will need to read the documentation on how to turn this feature on.
  3. Pic18s have a reset instruction
  4. The PLL multiplies the clock signal by 4. It maybe that with th ePLL enabled the resuting clock is too fast.
  5. A rather harsh judgement, have you met all the PIC16F877s in the world?
  6. I've just read through the programming sheet for that device and it seems a bit vague. It doesnt explicitly state that blocks must start on a byte boundary but looking at the diagram on page 16 I am guessing you have to. You could try embedding the jump vectors into your code so the get rewritten when you load in the application. You can do this using the #data pragma.
  7. Maxim have just released a USB host/ controler chip, the Max3421E. I dont know anything about it, I received details today from a mailshot off Maxim. It may be a solution to some of your USB problems, (then again it may not)
  8. Source boost 6.85 BoostCPic16 and BoostCpic 18 Seems to have crept in since 6.5 Variable masking has stopped working In the following example I have a struct called data, a function has a parameter called data. The compiler is trying to use the struct called data in the function. #include <system.h> #include "TestVarMask.h" #define BUFFER_SIZE 10 struct buffer { char Buffer[BUFFER_SIZE]; }serial, data; void storeAtWithNameConflict(char index, char data) { serial.Buffer[index] = data; } void storeAtWithoutNameConflict(char index, char storeData) { serial.Buffer[index] =
  9. Problem fixed. Fix will be available in the next release. Regards, Pavel Thanks Pavel! When is the next release expected? Or can I get a prerelease version with the fix?
  10. mmhhhh, I shall give that a try out as a test tomorrow. I've tried casting as Orin suggested It does fix the bug // TWO #defined constants if(result >= (APPLES + PEARS)) 0004 0E13 MOVLW 0x13 0006 84D8 BSF STATUS,Z 0008 6001 CPFSLT gbl_result 000A B4D8 BTFSC STATUS,Z 000C D001 BRA label1 000E D002 BRA label2 0010 label1 0014 label2 { result = NO_FRUIT; 0010 0E80 MOVLW 0x80 0012 6E01 MOVWF gbl_result } // TWO #defined constants cast to char if(result >= (char)(APPLES + PEARS)) 0014 0E13 MOVLW 0x13 0016 6001 CPFSLT gbl_resul
  11. You are quite right. We just started looking at this problem and it happens exactly as you described. We'll check if it can get fixed. Even though sum was promoted by compiler the resulting code should work. Can you please point where you think wrong code was generated. Regards, Pavel Hi Pavel This is the bad code , result will always end up set to NO_FRUIT // TWO #defined constants if(result >= (APPLES + PEARS)) 0004 0E13 MOVLW 0x13 0006 84D8 BSF STATUS,Z 0008 6001 CPFSLT gbl_result 000A B4D8 BTFSC STATUS,Z 000C D001 BRA label1 000E D002 BRA label2 00
  12. mmhhhh, I shall give that a try out as a test tomorrow.
  13. Sourceboost 6.84, and 6.85 Fault occured after upgrading from Sourceboost 6.5 Tried with PIC18F4685 and PIC16F877 Examples shown using PIC18F4685 Always reproducable. An if statement comparing to two added constant generates different (wrong) code to to when comparing against a single constant. EG #define APPLES 0x10 #define PEARS 0x3 #define APPLES_PEARS APPLES+PEARS #define ALL_FRUIT 0x13 #define NO_FRUIT 0x80 char result; void main() { // TWO #defined constants if(result >= (APPLES + PEARS)) { result = NO_FRUIT; } // A #defined of two #defined constants if(result >
  14. Details of the configuration fuses are available in the datasheet in section 25.0 SPECIAL FEATURES OF THE CPU
  15. Use a high voltage programmer and set the LVP bit high! NB a bulk erase does this. You might be able to frig the pickit by applying 12 volts (say from some batteries) to the Vpp pin then performing a bulk erase (assuming the pickit impliments bulk erase ). Dont try this during a program cycle as the programmer has to apply and reapply the program voltage during different phases of programming and I doubt you would be able to guess when to apply 12V.
  16. Do your programmers use Low Voltage programming mode? Your config has LVP_OFF which would cripple the chips if you only have LVP mode.
  17. The pic17F876 has a perfectly good USART, why are you trying to software emulate one?
  18. Why asm when you can C void clear_wdt( void )
  19. Is that a zener with a vernier for extra accuracy?
  20. What processor are you using. How about posting what you have so far and asking a specific question.
  21. Yes, thats confused. Read your post again, decide what you are trying to do, and then repost.
  22. Jebus! Its like a Dilbert story. The ap note refers to a product they no longer promote and they say it should have various warnings. Have you thought about total galvanic isolation, ie use a transformer or an optoisolator, its a little more inconvenient but less inconvenient than death.
  • Create New...