Jump to content

ChronoFish

EstablishedMember
  • Content Count

    12
  • Joined

  • Last visited

    Never

Community Reputation

0 Neutral

About ChronoFish

  • Rank
    Newbrie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yeah, Okay. I discovered the problem. There is no "timer1" for the 16f84a. The wizard unfortunately not only offered the option but went ahead and generated the code. Thanks anyway -CF
  2. Have you been able to reproduce the error? If so what do you recommend? Thanks, CF
  3. What do you mean under "PICC Wizard"? The project wizard can't even be started if the Picc Lite toolsuit is current. Regards, Pavel Are you stalling? :: I have no idea what you just said. All I know is that I start with a newly created (essentially blank) project. Then from the menu bar I click on Project->Wizard and a dialog box comes up that labeled "PICC Wizard". I think the steps I outlined are pretty explicit. It should give you enough to re-produce the problem. Thanks! CF
  4. Hello, I would like to suggest a Wizard enhancment. I like the way it works (I'm sure the bugs will be worked out eventually ) but there is one issue that has hit me several times. If you don't select a project target the wizard will fail. This is to be expected (where would the code go?) but then the wizard closes. It doen't give you a chance to go back and fix the change. And once the wizard closes, that's it - you have to re-select all your options again. This may not sound like a big deal, but you could easily have over 20 clicks. Make one mistake now it's 40. Mess up again now 60... Another nice option would be that once the code has actually been generated to be able to go back to the wizard with the options loaded as previously selected. That way you could inspect the code and then say - oops I selected wrong target. Then you could use the wizard to just change the target and everything else would be remembered. Of course the pipe dream would be for it to only alter the wizard generated code and leave any changes. At first look this seems very complicated, but really the wizard code could be delmited by comments to make it easier for replacement. /* [WIZARD CODE BEGIN] Code between comments will be rewritten by the wizard */ char someVar; char anotherVar; /* [WIZARD CODE END] */ /* Todo: Add your code below */ I wouldn't mind helping you with the Wizard code if you need assistance. Thanks and good luck! CF
  5. Thanks for the quick response. Here are the steps: 1. Create a blank project 2. Open PICC Wizard General Settings 2.1 Select Project Name (that you just created) 3. Select 16f84a 4. Unslect "EEPROM" Features 5. Select XT for Oscillator I/O Ports 6. Select PortA 7. Remove check from pin 1 (111110) 8. Verify output values (010000) 9. Select PortB 10. Verify I/O settings (11111111) 11. Verity output values (00000000) Timers 12. Select Timer0 13. Enable Timer 14. Run timer function every 0.5ms 15. Select Timer1 16. Select Internal/Timer at 0.001 resolution 17. Enable Timer 18. Run timer function every 0.05ms 19. Click Okay 20. Click Okay 21. Build Full Output from compiler C2C-plus 5.3e C-compiler Copyright(C) 1998-99,2000-2004 by Pavel Baranov http://www.picant.com/c2c/c.html [email=support@picant.com]support@picant.com[/email] (Extended version) Licensed to: Your Name Error.c Error.c(71): Error: Undefined identifier 't1con' Error.c(72): Error: Variable expected Error.c(72): Error: Undefined identifier 'TMR1IE' Error.c(72): Error: Undefined identifier 'TMR1IE' Error.c(72): Error: Undefined identifier 'TMR1IE' Error.c(135): Error: General error Error.c(139): Error: General error Error.c(142): Error: General error Error.c(145): Error: General error Error.c(147): Error: General error Error.c(147): Error: General error Error.c(147): Error: '(' expected piccode.c Finished. C:\PROGRA~1\SOURCE~2\c2c.exe -PPIC16F84A -SRC -ols -md -O2 -Ip16F84A.inc -oError.asm Error.c piccode.c C:\PROGRA~1\MPLABI~1\MCHIP_~1\MPASMWIN.EXE /aINHX8M /pPIC16F84A /rHEX /w2 /q Error.asm Done Failed
  6. Hi there, I receieve this error in version 5.2 so I upgraded. It didn't solve the problem. Target is a 16f84a Trying to use a single pin for output (porta). Two timers are setup. Timing code won't compiler The code in question is this: // timer 1 setup timer1_clone = 65486; t1con = 0x01; set_bit( pie1, TMR1IE ); The error report is here: C2C-plus 5.3e C-compiler Copyright(C) 1998-99,2000-2004 by Pavel Baranov http://www.picant.com/c2c/c.html [email=support@picant.com]support@picant.com[/email] (Extended version) Licensed to: ME 16CTX.c 16CTX.c(79): Error: Undefined identifier 't1con' 16CTX.c(80): Error: Variable expected 16CTX.c(80): Error: Undefined identifier 'TMR1IE' .... Finished. C:\PROGRA~1\SOURCE~2\c2c.exe -PPIC16F84A -SRC -ols -md -O2 -Ip16F84A.inc -o16CTX.asm 16CTX.c piccode.c C:\PROGRA~1\MPLABI~1\MCHIP_~1\MPASMWIN.EXE /aINHX8M /pPIC16F84A /rHEX /w2 /q 16CTX.asm Done Failed Please advise, CF
  7. This worked almost as planned. And more importantly I think I know why it didn't work 100%. What I was expecting: GP5 to pulse GP4 to pulse twice as fast as GP5 GP3 to stay low (it's input only) GP2 to pulse four times as fast as GP4 GP1 to pulse twice as fast as GP2 GP0 to pulse twice as fast as GP1 What I got: GP5 - check GP4 - check GP3 - Stays high. (as it should - but not as I expected) GP2 - Gives me two solid horiztonal lines on my oscilloscope GP1 - check GP0 - check The deal with GP2 is strange, but in reading the data sheets I see that GP2 can be configured as input with the OPTION register by setting T0CS (bit 5) to "1" , there-by overriding the TRIS register. I don't know if this is the default mode, and it does not appear that C2C sets the option register on its own. It also doen not appear that EPIC has this as an option. C2C does save the internall Oscillator for you - and simply selecting internal INTRC on EPIC was enough. Hope this helps for those of you who are a begginer like myself and have similar questions. -CF
  8. Hello, I'm not sure if c2c is the best compiler to learn C or C++, but it is cheap. I think the ideal situtation is to know C and ASM and then use C2C as a way to speed up your development. If you want to learn C / C++, learn on a fully functional compiler like GNU or Visual C++, and then apply your new-found knowledge to something more platform specific like C2C. -CF
  9. Okay, maybe I am an idiot. I can accept that. I am trying to program a 12c509A after blowing my chances with a 12c508A. All I'm trying to do is output an a number to the GPIO. #include <system.h> main() { // Setup I/O mask /**************************** * 12c508a: * movlw 0x3E ; load w with mask * tris gpio ; put mask on I/O port *****************************/ asm movlw 0 ; //all out asm tris GPIO ; gpio = 0; // Clear I/O char count = 0; while (1) { gpio = count++; } } First, do I really have to resort to ASM to set the GPIO mask? Second, do I need to do anything code-wise to use the internal oscillator other than set the option on my programmer (I'm using the EPIC)? Third, has anyone created a 12c5xx definition file for use with the debugger/simulator? Thanks! CF
  10. I would like to recommend that someone revamp the documentation. I am picking a C compiler because my ASM skills are virtually nil. Reading documentation that says stuff like "this is obsolete" is really not all that helpful. It would also be helpful to see a simple "hello world" program for each of the general PIC types. The existing examples take so many approaches that it's hard to get a feel for the basics. I registered C2C and the pluggins, and I guess I was expecting better support. CF
  11. I must admit that I was a bit put off that there were no response to my last post - not even - "You're an idiot why not try rebooting" or something like that. The logic analyzer does not seem to fail now (I have actually rebooted - I have no clue if that helped or not)... However there are still two issues. 1. If I start the Logic Analyzer and then go in to debug mode, the logic analyzer is replaced by the EEPROM block. 2. The "follow" function does not seem to work. If I click on "reset" the line levels change correctly, but this doesn't happen in real-time. Shouldn't it? Is anyone else seeing these issues? Thanks! CF
  12. Hello, I just installed and registered the additional plug-ins. The LED blocks work as anticpated, but the logic analyzer does not. Actually several things are happening: With PicAnt running and my most recent workspace loaded - button block and logic analyzer appear close to where I left them previously - then: 1: I click on the debug Icon Now logic analyzer is replaced with I2c EEprom - 2: Close the I2cEEprom 3: Restart the analyzer from the drop down menu 4: Undock the analyzer and re-size it 5: Click on Run icon Now Analyzer shows white "follow line" streak across display. Now display is frozen. Trying to close any PicAnt window results in a "not responding" warning/error from Windows XP (professional) and results in entire program shutting down. Code is fairly simple and follows #include <system.h> #include "tx.h" // If this is the 16C84 then carry over some of the 12C508A variables from p12c508a.h #ifdef _PIC16C84 // Registers char osccal@0x0005; char gpio@0x0006; // STATUS Bits #define GPWUF 0x0007 #define PA0 0x0005 // OPTION Bits #define NOT_GPWU 0x0007 #define NOT_GPPU 0x0006 // OSCCAL Bits #define OSCFST 0x0003 #define OSCSLW 0x0002 // Configuration Bits #define _MCLRE_ON 0x0FFF #define _MCLRE_OFF 0x0FEF #define _IntRC_OSC 0x0FFE #endif main() { char pin = 0x1; gpio = 0; // Clear I/O // Setup I/O mask /**************************** * 12c508a: * movlw 0x3E ; load w with mask * tris gpio ; put mask on I/O port * * 16c84: * movlw 0x3E ; load w with mask * movwf trisb ; put mask on I/O port * *****************************/ asm movlw 0x3e ; //00111110 #ifdef _PIC16C84 asm movwf TRISB ; #else asm tris GPIO ; #endif while (1) { gpio = pin; pin = pin + 0x1; nop(); } } Target is 16c84 - Christopher
×
×
  • Create New...