| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| _olaf_ 
 
 
 Joined: 24 Feb 2005
 Posts: 32
 
 
 
			    
 
 | 
			
				| Problem with PIN assign in PCW |  
				|  Posted: Tue Nov 15, 2011 2:23 pm |   |  
				| 
 |  
				| Hi, 
 I have a question about the PIN assign in the PCW PIC-Wizard. I want to setup a new PCW-Project with the PIC-Wizard. I set the processor (16F1827) the controller setting (oscillator etc.) and then i set the PIN configuration. I made a test by assigning Pin_a0 ... Pin_a5 as testa1...testa2, and Pin_b0 ... Pinb5 as testb0 ... testb5.
 (Pina0=>testa0
 .
 .
 .
 )
 
 But when I read the .c and the .h, there is no Pin assign
 
 test.h
 
  	  | Code: |  	  | 
 #include <16LF1827.h>
 #device adc=16
 
 #FUSES NOWDT                     //No Watch Dog Timer
 #FUSES WDT_SW                    //No Watch Dog Timer, enabled in Software
 #FUSES NOBROWNOUT                //No brownout reset
 #FUSES NOLVP                     //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
 
 #use delay(clock=20000000)
 
 #use FIXED_IO( A_outputs=PIN_A2,PIN_A1 )
 #use FIXED_IO( B_outputs=PIN_B5,PIN_B4,PIN_B3,PIN_B2 )
 #define LED PIN_None
 #define DELAY 1000
 
 
 | 
 
 test.c
 
  	  | Code: |  	  | 
 #include <test.h>
 
 
 
 void main()
 {
 
 
 setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
 
 //Example blinking LED program
 while(true){
 output_low(LED);
 delay_ms(DELAY);
 output_high(LED);
 delay_ms(DELAY);
 }
 
 }
 | 
 
 In a previous design with an 16F876 it all worked fine and in the *.h file was the pin assignement.
 
 I think it should be like this example from the previous design (inside the *.h-file)
 
  	  | Code: |  	  | #define LCD_DB4   PIN_C5
 #define LCD_DB5   PIN_C2
 #define LCD_DB6   PIN_C1
 #define LCD_DB7   PIN_C0
 #define En_Display Display(D_Nr)
 #define LCD_RS    PIN_C7
 #define LCD_RW    PIN_C6
 #define Display
 #define SDA PIN_C4
 #define SCL PIN_C3
 
 | 
 Did I miss something?
 
 Best Regards
 
 PCW Version 4.126
 |  | 
	
		|  | 
	
		| _olaf_ 
 
 
 Joined: 24 Feb 2005
 Posts: 32
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Wed Nov 16, 2011 10:57 am |   |  
				| 
 |  
				| Hi, 
 I tried it with two other processors and the PIC Wizard. But it is still the same. The assignment of a Pin name is not included in the *.h file. The only pin assignment which is in the file, is the one if I use the LED example.  If I set the pin function as output the statement
 
  	  | Code: |  	  | #use FIXED_IO( A_outputs=PIN_A2 )
 #use FIXED_IO( B_outputs=PIN_B3,PIN_B2 )
 
 | 
 is included in the *.h file.
 
 Is it a bug of the new compiler version or is it a problem with os (Win7 prof)?
 
 Regards Olaf
 |  | 
	
		|  | 
	
		| PCM programmer 
 
 
 Joined: 06 Sep 2003
 Posts: 21708
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Wed Nov 16, 2011 2:51 pm |   |  
				| 
 |  
				| The reason for no replies so far, is because about half of us don't have the IDE version of the compiler.   The users who do have it, mostly don't use
 the Wizard.
 |  | 
	
		|  | 
	
		| _olaf_ 
 
 
 Joined: 24 Feb 2005
 Posts: 32
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Nov 17, 2011 12:29 pm |   |  
				| 
 |  
				| Thanks for the reply. So it would be best to write a message to ccs. 
 Regards Olaf
 |  | 
	
		|  | 
	
		|  |