CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

problem with multiple streams

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ljb



Joined: 19 Nov 2003
Posts: 30

View user's profile Send private message

problem with multiple streams
PostPosted: Tue Sep 12, 2006 4:43 am     Reply with quote

I have 5 data streams (1h/w and 4 s/w). Only one tx's or rx's at a time.
Version = PCWH 3.249

Using the code below, the 'disp' stream gets redirected onto the 'com1' stream??
I'm not very good with listings, but there doesn't seem to be any code generated for the last two streams.
I have included the listing for the source. Any help would be greatly appreciated.

//------System------

#include <18f2620.h>
#fuses HS,NOWDT,NOPROTECT, NOBROWNOUT, PUT, NOLVP, NODEBUG
#use delay(clock=16384000)



//------data streams------

#use i2c(master, sda=PIN_C4, scl=PIN_C3, FAST, FORCE_HW)

#use rs232(baud=115200, xmit=PIN_C6, rcv=PIN_C7, Errors, stream=com1)
#use rs232(baud=57600, xmit=PIN_A4, rcv=PIN_A5, invert, stream=sens)
#use rs232(baud=57600, xmit=PIN_B5, rcv=PIN_B4, stream=mmc)
#use rs232(baud=9600, xmit=PIN_B7, rcv=PIN_B7, invert, stream=disp)
#use rs232(baud=9600, xmit=PIN_B6, rcv=PIN_B6, invert, stream=radio)



.................... //------System------
....................
.................... #include <18f2620.h>
.................... //////// Standard Header file for the PIC18F2620 device ////////////////
.................... #device PIC18F2620
.................... #list
....................
.................... #fuses HS,NOWDT,NOPROTECT, NOBROWNOUT, PUT, NOLVP, NODEBUG
.................... #use delay(clock=16384000)
*
010E4: CLRF FEA
010E6: MOVLW EE
010E8: MOVWF FE9
010EA: MOVF FEF,W
010EC: BZ 110C
010EE: MOVLW 05
010F0: MOVWF 01
010F2: CLRF 00
010F4: DECFSZ 00,F
010F6: BRA 10F4
010F8: DECFSZ 01,F
010FA: BRA 10F2
010FC: MOVLW 4E
010FE: MOVWF 00
01100: DECFSZ 00,F
01102: BRA 1100
01104: NOP
01106: NOP
01108: DECFSZ FEF,F
0110A: BRA 10EE
0110C: RETLW 00
....................
....................
....................
.................... //------data streams------
....................
.................... #use i2c(master, sda=PIN_C4, scl=PIN_C3, FAST, FORCE_HW)
*
01DFE: BCF FC6.7
01E00: BCF F9E.3
01E02: MOVFF 103,FC9
01E06: MOVLW 02
01E08: BTFSC FC6.7
01E0A: BRA 1E16
01E0C: BTFSS F9E.3
01E0E: BRA 1E0C
01E10: MOVLW 00
01E12: BTFSC FC5.6
01E14: MOVLW 01
01E16: MOVWF 01
01E18: RETLW 00
*
0263C: BSF FC5.3
0263E: BTFSC FC5.3
02640: BRA 263E
02642: BTFSC 00.0
02644: BCF FC5.5
02646: BTFSS 00.0
02648: BSF FC5.5
0264A: BSF FC5.4
0264C: BTFSC FC5.4
0264E: BRA 264C
02650: MOVFF FC9,01
02654: RETLW 00
....................
.................... #use rs232(baud=115200, xmit=PIN_C6, rcv=PIN_C7, Errors, stream=com1)
*
00ADA: BTFSS F9E.5
00ADC: BRA 0ADA
00ADE: MOVFF FAB,19
00AE2: MOVFF FAE,01
00AE6: BTFSS 19.1
00AE8: BRA 0AEE
00AEA: BCF FAB.4
00AEC: BSF FAB.4
00AEE: NOP
00AF0: RETLW 00
.................... #use rs232(baud=57600, xmit=PIN_A4, rcv=PIN_A5, invert, stream=sens)
*
00D58: BCF F92.4
00D5A: BSF F89.4
00D5C: MOVLW 08
00D5E: MOVWF 01
00D60: NOP
00D62: NOP
00D64: NOP
00D66: BSF 01.7
00D68: BRA 0D88
00D6A: BCF 01.7
00D6C: RRCF xFD,F
00D6E: BTFSC FD8.0
00D70: BCF F89.4
00D72: BTFSS FD8.0
00D74: BSF F89.4
00D76: BSF 01.6
00D78: BRA 0D88
00D7A: BCF 01.6
00D7C: DECFSZ 01,F
00D7E: BRA 0D6C
00D80: NOP
00D82: NOP
00D84: NOP
00D86: BCF F89.4
00D88: MOVLW 11
00D8A: MOVWF FE9
00D8C: DECFSZ FE9,F
00D8E: BRA 0D8C
00D90: NOP
00D92: NOP
00D94: BTFSC 01.7
00D96: BRA 0D6A
00D98: BTFSC 01.6
00D9A: BRA 0D7A
00D9C: RETLW 00
*
0143A: MOVLW 08
0143C: MOVWF 00
0143E: BSF F92.5
01440: BTFSS F80.5
01442: BRA 1440
01444: CLRF xFA
01446: BSF 00.7
01448: BRA 1466
0144A: BCF 00.7
0144C: BRA 1466
0144E: BCF FD8.0
01450: BTFSS F80.5
01452: BSF FD8.0
01454: RRCF xFA,F
01456: BSF 00.6
01458: BRA 1466
0145A: BCF 00.6
0145C: DECFSZ 00,F
0145E: BRA 144E
01460: MOVFF FA,01
01464: BRA 147E
01466: MOVLW 11
01468: BTFSC 00.7
0146A: MOVLW 04
0146C: MOVWF 01
0146E: DECFSZ 01,F
01470: BRA 146E
01472: NOP
01474: BTFSC 00.7
01476: BRA 144A
01478: BTFSC 00.6
0147A: BRA 145A
0147C: BRA 144E
0147E: GOTO 1548 (RETURN)
.................... #use rs232(baud=57600, xmit=PIN_B5, rcv=PIN_B4, stream=mmc)
*
018A2: BCF F93.5
018A4: BCF F8A.5
018A6: MOVLW 08
018A8: MOVWF 01
018AA: NOP
018AC: NOP
018AE: NOP
018B0: BSF 01.7
018B2: BRA 18D2
018B4: BCF 01.7
018B6: RRCF xFA,F
018B8: BTFSC FD8.0
018BA: BSF F8A.5
018BC: BTFSS FD8.0
018BE: BCF F8A.5
018C0: BSF 01.6
018C2: BRA 18D2
018C4: BCF 01.6
018C6: DECFSZ 01,F
018C8: BRA 18B6
018CA: NOP
018CC: NOP
018CE: NOP
018D0: BSF F8A.5
018D2: MOVLW 11
018D4: MOVWF FE9
018D6: DECFSZ FE9,F
018D8: BRA 18D6
018DA: NOP
018DC: NOP
018DE: BTFSC 01.7
018E0: BRA 18B4
018E2: BTFSC 01.6
018E4: BRA 18C4
018E6: RETLW 00
*
0195A: MOVLW 08
0195C: MOVWF 00
0195E: BSF F93.4
01960: BTFSC F81.4
01962: BRA 1960
01964: CLRF xFD
01966: BSF 00.7
01968: BRA 1986
0196A: BCF 00.7
0196C: BRA 1986
0196E: BCF FD8.0
01970: BTFSC F81.4
01972: BSF FD8.0
01974: RRCF xFD,F
01976: BSF 00.6
01978: BRA 1986
0197A: BCF 00.6
0197C: DECFSZ 00,F
0197E: BRA 196E
01980: MOVFF FD,01
01984: BRA 199E
01986: MOVLW 11
01988: BTFSC 00.7
0198A: MOVLW 04
0198C: MOVWF 01
0198E: DECFSZ 01,F
01990: BRA 198E
01992: NOP
01994: BTFSC 00.7
01996: BRA 196A
01998: BTFSC 00.6
0199A: BRA 197A
0199C: BRA 196E
0199E: GOTO 19E0 (RETURN)
.................... #use rs232(baud=9600, xmit=PIN_B7, rcv=PIN_B7, invert, stream=disp)
.................... #use rs232(baud=9600, xmit=PIN_B6, rcv=PIN_B6, invert, stream=radio)
....................
....................
....................
ljb



Joined: 19 Nov 2003
Posts: 30

View user's profile Send private message

PostPosted: Tue Sep 12, 2006 11:14 am     Reply with quote

Now solved.
After renaming the stream id's and all references from 'disp' to 'lcd' and 'radio' to 'rfmod', the code in the listing was generated for all streams and all now works fine. Very odd !!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group