ON 20080505@9:03:53 PM at page: http://massmind.org/microchip/condrepl.htm#39572.9575925926 James Newton[JMN-EFP-786] removed post 39572.9575925926 |Delete 'filip84@yahoo.com :
Very good place! My sites: chanel handbag replica louis vuitton handbags omega replica watches micro lingerie http://forums.speedguide.net/showthread.php?t=240556 http://forum.mootools.net/viewtopic.php?id=10076 http://forum.mootools.net/viewtopic.php?id=10078 http://www.nvnews.net/vbulletin/member.php?u=101088
' ON 20080505@9:12:11 PM at page: http://www.piclist.com/microchip/progserv.htm#39573.533287037 James Newton[JMN-EFP-786] removed post 39573.533287037 |Delete ' selam
  • ' ON 20080505@9:13:41 PM at page: http://www.piclist.com/microchip/12f683-rs232-9600-mm.htm#39573.7518981481 James Newton[JMN-EFP-786] published post 39573.7518981481 Thanks for the great code - would have taken me forever to figure that out from scratch. Below is a diff with some revisions I made to this routine. First, the _INTOSC outputs FOsc/4 on GP4, so it did not work at all as shown. _INTOSCIO fixes that. The rest is changing it to drive all of the initialization and IOC management and internal pullups based on the RXPIN and TXPIN settings. This way it is easy to use whatever pins best fit your design. If you use GP0 and GP1 as shown in my diff, it will work flawlessly with the Pickit 2 UART program so you can program or use a UART for device access all with one header and one external USB device.
    --- 12F683Serial-original.asm	2008-04-21 17:56:20.000000000 -0400
    +++ 12F683Serial.asm	2008-05-03 19:58:40.000000000 -0400
    @@ -20,3 +20,3 @@
     
    -	__config	_FCMEN_OFF & _IESO_OFF & _BOD_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _INTOSC
    +	__config	_FCMEN_OFF & _IESO_OFF & _BOD_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _INTOSCIO
     ;
    @@ -39,4 +39,4 @@
     
    -RXPIN	equ	0x03		;RS-232 RX (GP3)
    -TXPIN	equ	0x04		;RS-232 TX (GP4)
    +RXPIN	equ	0x00		;RS-232 RX (GP0)
    +TXPIN	equ	0x01		;RS-232 TX (GP1)
     BAUDX	equ	.208		;208 for 9600 baud
    @@ -48,2 +48,3 @@
     P_ISR	equ	0x72		;ISR 'PCLATH'
    +RX_MASK	equ 0x73		; Mask with RXPIN on others off
     ;
    @@ -82,4 +83,4 @@
     START	clrf	STATUS		;				  |B0
    -	movlw	b'00010000'	;tx pin in 'stop' condition	  |B0
    -	movwf	GPIO		;setup GPIO latch		  |B0
    +	clrf	GPIO 	; clear it
    +	bsf		GPIO,TXPIN	; init TXPIN in stop condition
     	goto	MAIN		;				  |B0
    @@ -134,3 +135,3 @@
     	movf	TXCNT,W		;get TX bit count		  |B0
    -	xorlw	b'00001011'	;start bit?			  |B0
    +	xorlw	b'00001010'	;start bit?			  |B0 
     	btfsc	STATUS,Z	;no, branch			  |B0
    @@ -161,4 +162,5 @@
     ISR_X	bsf	STATUS,RP0	;select bank 1			  |B1
    -	movlw	b'00001000'	;mask for bit 3			  |B1
    +	movf	RX_MASK,w
     	xorwf	IOC,f		;toggle GP3 IOC			  |B1
    +	
     	bcf	STATUS,RP0	;select bank 0			  |B0
    @@ -202,4 +204,5 @@
     	movwf	OSCCON		;8-mhz INTOSC system clock	  |B1
    -	movlw	b'00001000'	;GP3 input, all others output	  |B1
    +	movlw	b'00000000'	; Set mask as needed - 1 is input	  |B1
     	movwf	TRISIO		;				  |B1
    +	bsf		TRISIO,RXPIN	; make the RXPIN an input
     ;
    @@ -208,4 +211,13 @@
     ;
    -	movlw	b'00001000'	;				  |B1
    -	movwf	IOC		;set IOC for GP3 input		  |B1
    +	movlw	b'00000000'	;set mask as needed  |B1
    +	movwf	IOC		;set IOC off initially		  |B1
    +	bsf		IOC,RXPIN	; Set the receive pin for IOC
    +
    +; enabled weak pull up on RXPIN
    +	clrf	WPU		; set off weak pull ups 	|B1
    +	bsf		WPU,RXPIN	; make the receive pin a pull up
    +
    +; Set the RX_MASK properly
    +	clrf	RX_MASK
    +	bsf		RX_MASK,RXPIN
     ;
    @@ -216,2 +228,3 @@
     	bcf	STATUS,RP0	;bank 0				  |B0
    +
     ;
    @@ -264,3 +277,3 @@
     	movwf	TXVAR		;stuff character		  |B0
    -	movlw	b'00001011'	;				  |B0
    +	movlw	b'00001010'	;				  |B0
     	movwf	TXCNT		;set TX bit count		  |B0
    
    |Delete 'P-' before: '' but after: 'now987@gmail.com : " c274t " ' ON 20080514@1:40:04 PM at page: http://www.piclist.com/microchip/osc.htm#39580.5850115741 James Newton[JMN-EFP-786] removed post 39580.5850115741 with comment: 'No homework.' |Delete 'emazigo@yahoo.com asks:
    hi, i am doing my final year project, I am using PIC 16F84A, I have aleady written a source code and have an hex file aready. Is there the way of knowing why/how using a 4Mhz Crystal instead of the other crystals? I just had this value from the datasheet but dont know where is it coming from.Thanks
    ' ON 20080521@11:02:35 PM at page: http://www.piclist.com/microchip/spi.htm#39589.2069560185 James Newton[JMN-EFP-786] Published and replied to post 39589.2069560185 by eur |Insert 'Actually, I believe INIT_PORTS does set the OPTION register for SPI operation.' at: '' eur@fiwihex.nl " Hi

    Sample 16F876 code with spi master setup as well as RS232, etc... by Tony Kübek

    has no actual SPI code, only UART" |Delete 'P-' before: '' but after: 'eur@fiwihex.nl
    Hi

    INIT_PORTS does set the OPTION register for SPI operation

    The OPTION register has nothing to do with SPI. It controls TMR0 and port_b pullups.

    |Delete 'P-' before: '' but after: ' thanks
  • ' ON 20080531@12:35:13 PM at page: http://www.piclist.com/microchip/links.htm#39599.0622337963 James Newton[JMN-EFP-786] removed post 39599.0622337963 |Delete 'crystaltechesolution@gmail.com refers to
    http://www.crystaltechesolutions.com Website Design CompanyCrystaltech eSolutions is a Web development company and offshore outsourcing company based in UK, North India. Crystaltech eSolutions invites offshore clients to outsource Web design and development to India. Crystal eSolutions offer a wide range of services including Web design, Web development, Application development, Mobile application development, Flash development and Search Engine Optimization
  • '