View Issue Details

IDProjectCategoryView StatusLast Update
0000381GC StudioGCstudiopublic2023-09-01 06:24
Reporteranonymous Assigned To 
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformPC windowsOSwindows 10 
Product Version1.00.17 
Target Version1.01.018Fixed in Version1.01.018 
Summary0000381: SSD1306_32 display does not work with 18F4550 because the I2C_Address 0x78 is not used
DescriptionIf I define the right I2C address as follows:

#define GLCD_TYPE GLCD_TYPE_SSD1306_32
#define GLCD_I2C_Address 0x78 this does not work right.
In stead of the address 0x78 , 0x7E is sent to the SSD1306 and no ack. follows so the display does not react

I did find the following in the .asm file:
;HI2CStart
; rcall HI2CSTART
;HI2CSend GLCD_I2C_Address
; movlw 126 ' this is the failing I2C address 0x7E
; movwf I2CBYTE,ACCESS
; rcall HI2CSEND
Additional InformationMy mail adddress is Giel_Cals@hotmail.com


I also made a sendT sub and that works OK with the display see the .GCB file

I checked the communication with My Ikalogic probe that shows the wrong I2C address too
TagsNo tags attached.

Activities

anonymous

2023-07-06 22:56

viewer  

18F4550_1306.gcb (5,417 bytes)   
'''GCB Program. 18F4550 + SSD1306
#chip 18F4550,8
'''----- Includes
'#include <glcd_ssd1306.h>
#include <glcd.h>

; ----- Define GLCD Hardware settings
#define GLCD_TYPE GLCD_TYPE_SSD1306_32
#define GLCD_I2C_Address 0x78
'#define GLCD_I2C_Address 0x78
' NOTE in stead of 0x78 , 0x7E is sent and the display
'does not react al all
'In the assemble file I found:
'*******************
;HI2CStart
;	rcall	HI2CSTART
;HI2CSend GLCD_I2C_Address
;	movlw	126 ' this is the failing I2C address 0x7E
;	movwf	I2CBYTE,ACCESS
;	rcall	HI2CSEND
'*******************
#define GLCD_PROTECTOVERRUN
#define GLCD_TYPE_SSD1306_CHARACTER_MODE_ONLY
#define GLCD_TYPE_SSD1306_LOWMEMORY_GLCD_MODE

' Define Hardware I2C settings
#Define HI2C_BAUD_RATE 100
#Define HI2C_DATA PORTB.0
#define HI2C_CLOCK PORTB.1
Dir HI2C_DATA in
Dir HI2C_CLOCK in
HI2CMode Master

do Forever
    'sendT
    test
    wait 3 s
loop

sub test
    GLCD_Open_PageTransaction 0,7
    GLCDCLS
    GLCDPrint 0,0, "T"
    GLCD_Close_PageTransaction
end Sub






sub FindID
    Dim DeviceID as Byte
    for DeviceID = 115 to 127
        HI2CSTART
        HI2CSEND ( DeviceID)
        HI2CSend ( 0 )
        HI2CStop
    next
end Sub

sub sendT' sends a letter T at pos 0.0
    '120 will send 0x78 and with ack OK
    '"T" this method works well
HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0xae )
    HI2CSend ( 0xd5 )
    HI2CSend ( 0x80 )
    HI2CSend ( 0xa8 )
HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0x1f )
HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0xd3 )
    HI2CSend ( 0x00 )
    HI2CSend ( 0x40 )
    HI2CSend ( 0x8d )
HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0x14 )
HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0x20 )
    HI2CSend ( 0x00 )
    HI2CSend ( 0xa1 )
    HI2CSend ( 0xc8 )
HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0xda )
HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0x02 )
HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0x81 )
HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0x8f )
HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0xd9 )
HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0xf1 )
HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0xdb )
    HI2CSend ( 0x40 )
    HI2CSend ( 0xa4 )
    HI2CSend ( 0xa6 )
    HI2CSend ( 0x2e )
    HI2CSend ( 0xaf )
HI2CStop



    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0x22 )
    HI2CSend ( 0x00 )
    HI2CSend ( 0xff )
    HI2CSend ( 0x21 )
    HI2CSend ( 0x00 )
    HI2CStop
    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x00 )
    HI2CSend ( 0x7f )
    HI2CStop

    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    HI2CSend ( 0x03 )
    HI2CSend ( 0x01 )
    HI2CSend ( 0x7f )
    HI2CSend ( 0x01 )
    HI2CSend ( 0x03 )
    for i=1 to 26
        HI2CSend ( 0 )
    next
    HI2CStop

    HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 31
        HI2CSend ( 0 )
    next
    HI2CStop
       HI2CSTART
    HI2CSEND ( 0x78)
    HI2CSend ( 0x40 )
    for i=1 to 20
        HI2CSend ( 0 )
    next
    HI2CStop

    
end Sub
18F4550_1306.gcb (5,417 bytes)   
18F4550_1306.asm (23,687 bytes)
18F4550_1306.lst (37,210 bytes)   
GCASM List File (GCBASIC 1.00.00 2023-05-31 (Windows 64 bit) : Build 1249)

Symbols:
A 	EQU 	0
ABDEN 	EQU 	0
ABDOVF 	EQU 	7
ACCESS 	EQU 	0
ACKDT 	EQU 	5
ACKEN 	EQU 	4
ACKSTAT 	EQU 	6
ACQT0 	EQU 	3
ACQT1 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	0
SWDTEN 	EQU 	0
SYNC 	EQU 	4
SYSDOLOOP_E1 	EQU 	36
SYSDOLOOP_S1 	EQU 	26
SYSFORLOOP1 	EQU 	720
SYSFORLOOP10 	EQU 	1008
SYSFORLOOP11 	EQU 	1040
SYSFORLOOP12 	EQU 	1072
SYSFORLOOP13 	EQU 	1104
SYSFORLOOP14 	EQU 	1136
SYSFORLOOP15 	EQU 	1168
SYSFORLOOP16 	EQU 	1200
SYSFORLOOP17 	EQU 	1232
SYSFORLOOP2 	EQU 	752
SYSFORLOOP3 	EQU 	784
SYSFORLOOP4 	EQU 	816
SYSFORLOOP5 	EQU 	848
SYSFORLOOP6 	EQU 	880
SYSFORLOOP7 	EQU 	912
SYSFORLOOP8 	EQU 	944
SYSFORLOOP9 	EQU 	976
SYSFORLOOPEND1 	EQU 	734
SYSFORLOOPEND10 	EQU 	1022
SYSFORLOOPEND11 	EQU 	1054
SYSFORLOOPEND12 	EQU 	1086
SYSFORLOOPEND13 	EQU 	1118
SYSFORLOOPEND14 	EQU 	1150
SYSFORLOOPEND15 	EQU 	1182
SYSFORLOOPEND16 	EQU 	1214
SYSFORLOOPEND17 	EQU 	1246
SYSFORLOOPEND2 	EQU 	766
SYSFORLOOPEND3 	EQU 	798
SYSFORLOOPEND4 	EQU 	830
SYSFORLOOPEND5 	EQU 	862
SYSFORLOOPEND6 	EQU 	894
SYSFORLOOPEND7 	EQU 	926
SYSFORLOOPEND8 	EQU 	958
SYSFORLOOPEND9 	EQU 	990
SYSWAITLOOP1 	EQU 	202
SYSWAITLOOP2 	EQU 	216
SYSWAITLOOP3 	EQU 	228
SYSWAITTEMPMS 	EQU 	2
SYSWAITTEMPMS_H 	EQU 	3
SYSWAITTEMPS 	EQU 	4
T08BIT 	EQU 	6
T0CKI 	EQU 	4
T0CON 	EQU 	4053
T0CS 	EQU 	5
T0IE 	EQU 	5
T0IF 	EQU 	2
T0IP 	EQU 	2
T0PS0 	EQU 	0
T0PS1 	EQU 	1
T0PS2 	EQ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 	4049
WR 	EQU 	1
WREG 	EQU 	4072
WREN 	EQU 	2
WRERR 	EQU 	3
WRSPP 	EQU 	6
WS0 	EQU 	0
WS1 	EQU 	1
WS2 	EQU 	2
WS3 	EQU 	3
WUE 	EQU 	1
Z 	EQU 	2

Code:
Loc	Obj Code	Original Assembly











000000	EF06 F000	GOTO BASPROGRAMSTART

000008	0010	RETFIE



		BASPROGRAMSTART
00000C	D878	RCALL INITSYS
00000E	D822	RCALL HI2CINIT

000010	8093	BSF TRISB,0,ACCESS
000012	8293	BSF TRISB,1,ACCESS
000014	0E0C	MOVLW 12
000016	6E06	MOVWF HI2CCURRENTMODE,ACCESS
000018	D81F	RCALL HI2CMODE
		SYSDOLOOP_S1
00001A	D886	RCALL SENDT
00001C	0E03	MOVLW 3
00001E	6E04	MOVWF SYSWAITTEMPS,ACCESS
000020	D811	RCALL DELAY_S
000022	D7FB	BRA SYSDOLOOP_S1
		SYSDOLOOP_E1
		BASPROGRAMEND
000024	0003	SLEEP
000026	D7FE	BRA BASPROGRAMEND


		DELAY_MS
000028	2A03	INCF SYSWAITTEMPMS_H, F,ACCESS
		DMS_START
00002A	0E04	MOVLW 4
00002C	6E01	MOVWF DELAYTEMP2,ACCESS
		DMS_OUTER
00002E	0EA5	MOVLW 165
000030	6E00	MOVWF DELAYTEMP,ACCESS
		DMS_INNER
000032	2E00	DECFSZ DELAYTEMP, F,ACCESS
000034	D7FE	BRA DMS_INNER
000036	2E01	DECFSZ DELAYTEMP2, F,ACCESS
000038	D7FA	BRA DMS_OUTER
00003A	2E02	DECFSZ SYSWAITTEMPMS, F,ACCESS
00003C	D7F6	BRA DMS_START
00003E	2E03	DECFSZ SYSWAITTEMPMS_H, F,ACCESS
000040	D7F4	BRA DMS_START
000042	0012	RETURN


		DELAY_S
		DS_START
000044	0EE8	MOVLW 232
000046	6E02	MOVWF SYSWAITTEMPMS,ACCESS
000048	0E03	MOVLW 3
00004A	6E03	MOVWF SYSWAITTEMPMS_H,ACCESS
00004C	DFED	RCALL DELAY_MS
00004E	2E04	DECFSZ SYSWAITTEMPS, F,ACCESS
000050	D7F9	BRA DS_START
000052	0012	RETURN


		HI2CINIT
000054	6A06	CLRF HI2CCURRENTMODE,ACCESS
000056	0012	RETURN


		HI2CMODE
000058	8EC7	BSF SSPSTAT,SMP,ACCESS
00005A	88C6	BSF SSPCON1,CKP,ACCESS
00005C	9EC6	BCF SSPCON1,WCOL,ACCESS
00005E	0E0C	MOVLW 12
000060	5C06	SUBWF HI2CCURRENTMODE,W,ACCESS
000062	A4D8	BTFSS STATUS, Z,ACCESS
000064	D006	BRA ENDIF18
000066	86C6	BSF SSPCON1,SSPM3,ACCESS
000068	94C6	BCF SSPCON1,SSPM2,ACCESS
00006A	92C6	BCF SSPCON1,SSPM1,ACCESS
00006C	90C6	BCF SSPCON1,SSPM0,ACCESS
00006E	0E13	MOVLW 19
000070	6EC8	MOVWF SSPADD,ACCESS
		ENDIF18
000072	5206	MOVF HI2CCURRENTMODE,F,ACCESS
000074	A4D8	BTFSS STATUS, Z,ACCESS
000076	D004	BRA ENDIF19
000078	96C6	BCF SSPCON1,SSPM3,ACCESS
00007A	84C6	BSF SSPCON1,SSPM2,ACCESS
00007C	82C6	BSF SSPCON1,SSPM1,ACCESS
00007E	90C6	BCF SSPCON1,SSPM0,ACCESS
		ENDIF19
000080	0E03	MOVLW 3
000082	5C06	SUBWF HI2CCURRENTMODE,W,ACCESS
000084	A4D8	BTFSS STATUS, Z,ACCESS
000086	D004	BRA ENDIF20
000088	96C6	BCF SSPCON1,SSPM3,ACCESS
00008A	84C6	BSF SSPCON1,SSPM2,ACCESS
00008C	82C6	BSF SSPCON1,SSPM1,ACCESS
00008E	80C6	BSF SSPCON1,SSPM0,ACCESS
		ENDIF20
000090	8AC6	BSF SSPCON1,SSPEN,ACCESS
000092	0012	RETURN


		HI2CSEND
		RETRYHI2CSEND
000094	9EC6	BCF SSPCON1,WCOL,ACCESS
000096	C009 FFC9	MOVFF I2CBYTE,SSPBUF
00009A	D827	RCALL HI2CWAITMSSP
00009C	ACC5	BTFSS SSPCON2,ACKSTAT,ACCESS
00009E	D002	BRA ELSE23_1
0000A0	6805	SETF HI2CACKPOLLSTATE,ACCESS
0000A2	D001	BRA ENDIF23
		ELSE23_1
0000A4	6A05	CLRF HI2CACKPOLLSTATE,ACCESS
		ENDIF23
0000A6	AEC6	BTFSS SSPCON1,WCOL,ACCESS
0000A8	D004	BRA ENDIF24
0000AA	5006	MOVF HI2CCURRENTMODE,W,ACCESS
0000AC	080A	SUBLW 10
0000AE	B0D8	BTFSC STATUS, C,ACCESS
0000B0	D7F1	BRA RETRYHI2CSEND
		ENDIF24
0000B2	5006	MOVF HI2CCURRENTMODE,W,ACCESS
0000B4	080A	SUBLW 10
0000B6	B0D8	BTFSC STATUS, C,ACCESS
0000B8	88C6	BSF SSPCON1,CKP,ACCESS
0000BA	0012	RETURN


		HI2CSTART
0000BC	5006	MOVF HI2CCURRENTMODE,W,ACCESS
0000BE	080A	SUBLW 10
0000C0	B0D8	BTFSC STATUS, C,ACCESS
0000C2	D003	BRA ELSE21_1
0000C4	80C5	BSF SSPCON2,SEN,ACCESS
0000C6	D811	RCALL HI2CWAITMSSP
0000C8	D002	BRA ENDIF21
		ELSE21_1
		SYSWAITLOOP1
0000CA	A6C7	BTFSS SSPSTAT,S,ACCESS
0000CC	D7FE	BRA SYSWAITLOOP1
		ENDIF21
0000CE	0012	RETURN


		HI2CSTOP
0000D0	5006	MOVF HI2CCURRENTMODE,W,ACCESS
0000D2	080A	SUBLW 10
0000D4	B0D8	BTFSC STATUS, C,ACCESS
0000D6	D006	BRA ELSE22_1
		SYSWAITLOOP2
0000D8	B4C7	BTFSC SSPSTAT,R_NOT_W,ACCESS
0000DA	D7FE	BRA SYSWAITLOOP2
0000DC	84C5	BSF SSPCON2,PEN,ACCESS
0000DE	84C5	BSF SSPCON2,PEN,ACCESS
0000E0	D804	RCALL HI2CWAITMSSP
0000E2	D002	BRA ENDIF22
		ELSE22_1
		SYSWAITLOOP3
0000E4	A8C7	BTFSS SSPSTAT,P,ACCESS
0000E6	D7FE	BRA SYSWAITLOOP3
		ENDIF22
0000E8	0012	RETURN


		HI2CWAITMSSP
0000EA	6A07	CLRF HI2CWAITMSSPTIMEOUT,ACCESS
		HI2CWAITMSSPWAIT
0000EC	2A07	INCF HI2CWAITMSSPTIMEOUT,F,ACCESS
0000EE	0EFF	MOVLW 255
0000F0	5C07	SUBWF HI2CWAITMSSPTIMEOUT,W,ACCESS
0000F2	B0D8	BTFSC STATUS, C,ACCESS
0000F4	D003	BRA ENDIF27
0000F6	A69E	BTFSS PIR1,SSPIF,ACCESS
0000F8	D7F9	BRA HI2CWAITMSSPWAIT
0000FA	969E	BCF PIR1,SSPIF,ACCESS
		ENDIF27
0000FC	0012	RETURN


		INITSYS
0000FE	0E8F	MOVLW 143
000100	16D3	ANDWF OSCCON,F,ACCESS
000102	8CD3	BSF OSCCON,IRCF2,ACCESS
000104	8AD3	BSF OSCCON,IRCF1,ACCESS
000106	88D3	BSF OSCCON,IRCF0,ACCESS
000108	6AE0	CLRF BSR,ACCESS
00010A	6AF8	CLRF TBLPTRU,ACCESS
00010C	9EC0	BCF ADCON2,ADFM,ACCESS
00010E	90C2	BCF ADCON0,ADON,ACCESS
000110	86C1	BSF ADCON1,PCFG3,ACCESS
000112	84C1	BSF ADCON1,PCFG2,ACCESS
000114	82C1	BSF ADCON1,PCFG1,ACCESS
000116	80C1	BSF ADCON1,PCFG0,ACCESS
000118	0E07	MOVLW 7
00011A	6EB4	MOVWF CMCON,ACCESS
00011C	6A80	CLRF PORTA,ACCESS
00011E	6A81	CLRF PORTB,ACCESS
000120	6A82	CLRF PORTC,ACCESS
000122	6A83	CLRF PORTD,ACCESS
000124	6A84	CLRF PORTE,ACCESS
000126	0012	RETURN


		SENDT
000128	DFC9	RCALL HI2CSTART
00012A	0E78	MOVLW 120
00012C	6E09	MOVWF I2CBYTE,ACCESS
00012E	DFB2	RCALL HI2CSEND
000130	6A09	CLRF I2CBYTE,ACCESS
000132	DFB0	RCALL HI2CSEND
000134	0EAE	MOVLW 174
000136	6E09	MOVWF I2CBYTE,ACCESS
000138	DFAD	RCALL HI2CSEND
00013A	0ED5	MOVLW 213
00013C	6E09	MOVWF I2CBYTE,ACCESS
00013E	DFAA	RCALL HI2CSEND
000140	0E80	MOVLW 128
000142	6E09	MOVWF I2CBYTE,ACCESS
000144	DFA7	RCALL HI2CSEND
000146	0EA8	MOVLW 168
000148	6E09	MOVWF I2CBYTE,ACCESS
00014A	DFA4	RCALL HI2CSEND
00014C	DFC1	RCALL HI2CSTOP
00014E	DFB6	RCALL HI2CSTART
000150	0E78	MOVLW 120
000152	6E09	MOVWF I2CBYTE,ACCESS
000154	DF9F	RCALL HI2CSEND
000156	6A09	CLRF I2CBYTE,ACCESS
000158	DF9D	RCALL HI2CSEND
00015A	0E1F	MOVLW 31
00015C	6E09	MOVWF I2CBYTE,ACCESS
00015E	DF9A	RCALL HI2CSEND
000160	DFB7	RCALL HI2CSTOP
000162	DFAC	RCALL HI2CSTART
000164	0E78	MOVLW 120
000166	6E09	MOVWF I2CBYTE,ACCESS
000168	DF95	RCALL HI2CSEND
00016A	6A09	CLRF I2CBYTE,ACCESS
00016C	DF93	RCALL HI2CSEND
00016E	0ED3	MOVLW 211
000170	6E09	MOVWF I2CBYTE,ACCESS
000172	DF90	RCALL HI2CSEND
000174	6A09	CLRF I2CBYTE,ACCESS
000176	DF8E	RCALL HI2CSEND
000178	0E40	MOVLW 64
00017A	6E09	MOVWF I2CBYTE,ACCESS
00017C	DF8B	RCALL HI2CSEND
00017E	0E8D	MOVLW 141
000180	6E09	MOVWF I2CBYTE,ACCESS
000182	DF88	RCALL HI2CSEND
000184	DFA5	RCALL HI2CSTOP
000186	DF9A	RCALL HI2CSTART
000188	0E78	MOVLW 120
00018A	6E09	MOVWF I2CBYTE,ACCESS
00018C	DF83	RCALL HI2CSEND
00018E	6A09	CLRF I2CBYTE,ACCESS
000190	DF81	RCALL HI2CSEND
000192	0E14	MOVLW 20
000194	6E09	MOVWF I2CBYTE,ACCESS
000196	DF7E	RCALL HI2CSEND
000198	DF9B	RCALL HI2CSTOP
00019A	DF90	RCALL HI2CSTART
00019C	0E78	MOVLW 120
00019E	6E09	MOVWF I2CBYTE,ACCESS
0001A0	DF79	RCALL HI2CSEND
0001A2	6A09	CLRF I2CBYTE,ACCESS
0001A4	DF77	RCALL HI2CSEND
0001A6	0E20	MOVLW 32
0001A8	6E09	MOVWF I2CBYTE,ACCESS
0001AA	DF74	RCALL HI2CSEND
0001AC	6A09	CLRF I2CBYTE,ACCESS
0001AE	DF72	RCALL HI2CSEND
0001B0	0EA1	MOVLW 161
0001B2	6E09	MOVWF I2CBYTE,ACCESS
0001B4	DF6F	RCALL HI2CSEND
0001B6	0EC8	MOVLW 200
0001B8	6E09	MOVWF I2CBYTE,ACCESS
0001BA	DF6C	RCALL HI2CSEND
0001BC	DF89	RCALL HI2CSTOP
0001BE	DF7E	RCALL HI2CSTART
0001C0	0E78	MOVLW 120
0001C2	6E09	MOVWF I2CBYTE,ACCESS
0001C4	DF67	RCALL HI2CSEND
0001C6	6A09	CLRF I2CBYTE,ACCESS
0001C8	DF65	RCALL HI2CSEND
0001CA	0EDA	MOVLW 218
0001CC	6E09	MOVWF I2CBYTE,ACCESS
0001CE	DF62	RCALL HI2CSEND
0001D0	DF7F	RCALL HI2CSTOP
0001D2	DF74	RCALL HI2CSTART
0001D4	0E78	MOVLW 120
0001D6	6E09	MOVWF I2CBYTE,ACCESS
0001D8	DF5D	RCALL HI2CSEND
0001DA	6A09	CLRF I2CBYTE,ACCESS
0001DC	DF5B	RCALL HI2CSEND
0001DE	0E02	MOVLW 2
0001E0	6E09	MOVWF I2CBYTE,ACCESS
0001E2	DF58	RCALL HI2CSEND
0001E4	DF75	RCALL HI2CSTOP
0001E6	DF6A	RCALL HI2CSTART
0001E8	0E78	MOVLW 120
0001EA	6E09	MOVWF I2CBYTE,ACCESS
0001EC	DF53	RCALL HI2CSEND
0001EE	6A09	CLRF I2CBYTE,ACCESS
0001F0	DF51	RCALL HI2CSEND
0001F2	0E81	MOVLW 129
0001F4	6E09	MOVWF I2CBYTE,ACCESS
0001F6	DF4E	RCALL HI2CSEND
0001F8	DF6B	RCALL HI2CSTOP
0001FA	DF60	RCALL HI2CSTART
0001FC	0E78	MOVLW 120
0001FE	6E09	MOVWF I2CBYTE,ACCESS
000200	DF49	RCALL HI2CSEND
000202	6A09	CLRF I2CBYTE,ACCESS
000204	DF47	RCALL HI2CSEND
000206	0E8F	MOVLW 143
000208	6E09	MOVWF I2CBYTE,ACCESS
00020A	DF44	RCALL HI2CSEND
00020C	DF61	RCALL HI2CSTOP
00020E	DF56	RCALL HI2CSTART
000210	0E78	MOVLW 120
000212	6E09	MOVWF I2CBYTE,ACCESS
000214	DF3F	RCALL HI2CSEND
000216	6A09	CLRF I2CBYTE,ACCESS
000218	DF3D	RCALL HI2CSEND
00021A	0ED9	MOVLW 217
00021C	6E09	MOVWF I2CBYTE,ACCESS
00021E	DF3A	RCALL HI2CSEND
000220	DF57	RCALL HI2CSTOP
000222	DF4C	RCALL HI2CSTART
000224	0E78	MOVLW 120
000226	6E09	MOVWF I2CBYTE,ACCESS
000228	DF35	RCALL HI2CSEND
00022A	6A09	CLRF I2CBYTE,ACCESS
00022C	DF33	RCALL HI2CSEND
00022E	0EF1	MOVLW 241
000230	6E09	MOVWF I2CBYTE,ACCESS
000232	DF30	RCALL HI2CSEND
000234	DF4D	RCALL HI2CSTOP
000236	DF42	RCALL HI2CSTART
000238	0E78	MOVLW 120
00023A	6E09	MOVWF I2CBYTE,ACCESS
00023C	DF2B	RCALL HI2CSEND
00023E	6A09	CLRF I2CBYTE,ACCESS
000240	DF29	RCALL HI2CSEND
000242	0EDB	MOVLW 219
000244	6E09	MOVWF I2CBYTE,ACCESS
000246	DF26	RCALL HI2CSEND
000248	0E40	MOVLW 64
00024A	6E09	MOVWF I2CBYTE,ACCESS
00024C	DF23	RCALL HI2CSEND
00024E	0EA4	MOVLW 164
000250	6E09	MOVWF I2CBYTE,ACCESS
000252	DF20	RCALL HI2CSEND
000254	0EA6	MOVLW 166
000256	6E09	MOVWF I2CBYTE,ACCESS
000258	DF1D	RCALL HI2CSEND
00025A	0E2E	MOVLW 46
00025C	6E09	MOVWF I2CBYTE,ACCESS
00025E	DF1A	RCALL HI2CSEND
000260	0EAF	MOVLW 175
000262	6E09	MOVWF I2CBYTE,ACCESS
000264	DF17	RCALL HI2CSEND
000266	DF34	RCALL HI2CSTOP
000268	DF29	RCALL HI2CSTART
00026A	0E78	MOVLW 120
00026C	6E09	MOVWF I2CBYTE,ACCESS
00026E	DF12	RCALL HI2CSEND
000270	6A09	CLRF I2CBYTE,ACCESS
000272	DF10	RCALL HI2CSEND
000274	0E22	MOVLW 34
000276	6E09	MOVWF I2CBYTE,ACCESS
000278	DF0D	RCALL HI2CSEND
00027A	6A09	CLRF I2CBYTE,ACCESS
00027C	DF0B	RCALL HI2CSEND
00027E	6809	SETF I2CBYTE,ACCESS
000280	DF09	RCALL HI2CSEND
000282	0E21	MOVLW 33
000284	6E09	MOVWF I2CBYTE,ACCESS
000286	DF06	RCALL HI2CSEND
000288	6A09	CLRF I2CBYTE,ACCESS
00028A	DF04	RCALL HI2CSEND
00028C	DF21	RCALL HI2CSTOP
00028E	DF16	RCALL HI2CSTART
000290	0E78	MOVLW 120
000292	6E09	MOVWF I2CBYTE,ACCESS
000294	DEFF	RCALL HI2CSEND
000296	6A09	CLRF I2CBYTE,ACCESS
000298	DEFD	RCALL HI2CSEND
00029A	0E7F	MOVLW 127
00029C	6E09	MOVWF I2CBYTE,ACCESS
00029E	DEFA	RCALL HI2CSEND
0002A0	DF17	RCALL HI2CSTOP
0002A2	DF0C	RCALL HI2CSTART
0002A4	0E78	MOVLW 120
0002A6	6E09	MOVWF I2CBYTE,ACCESS
0002A8	DEF5	RCALL HI2CSEND
0002AA	0E40	MOVLW 64
0002AC	6E09	MOVWF I2CBYTE,ACCESS
0002AE	DEF2	RCALL HI2CSEND
0002B0	0E03	MOVLW 3
0002B2	6E09	MOVWF I2CBYTE,ACCESS
0002B4	DEEF	RCALL HI2CSEND
0002B6	0E01	MOVLW 1
0002B8	6E09	MOVWF I2CBYTE,ACCESS
0002BA	DEEC	RCALL HI2CSEND
0002BC	0E7F	MOVLW 127
0002BE	6E09	MOVWF I2CBYTE,ACCESS
0002C0	DEE9	RCALL HI2CSEND
0002C2	0E01	MOVLW 1
0002C4	6E09	MOVWF I2CBYTE,ACCESS
0002C6	DEE6	RCALL HI2CSEND
0002C8	0E03	MOVLW 3
0002CA	6E09	MOVWF I2CBYTE,ACCESS
0002CC	DEE3	RCALL HI2CSEND
0002CE	6A08	CLRF I,ACCESS
		SYSFORLOOP1
0002D0	2A08	INCF I,F,ACCESS
0002D2	6A09	CLRF I2CBYTE,ACCESS
0002D4	DEDF	RCALL HI2CSEND
0002D6	0E1A	MOVLW 26
0002D8	5C08	SUBWF I,W,ACCESS
0002DA	A0D8	BTFSS STATUS, C,ACCESS
0002DC	D7F9	BRA SYSFORLOOP1
		SYSFORLOOPEND1
0002DE	DEF8	RCALL HI2CSTOP
0002E0	DEED	RCALL HI2CSTART
0002E2	0E78	MOVLW 120
0002E4	6E09	MOVWF I2CBYTE,ACCESS
0002E6	DED6	RCALL HI2CSEND
0002E8	0E40	MOVLW 64
0002EA	6E09	MOVWF I2CBYTE,ACCESS
0002EC	DED3	RCALL HI2CSEND
0002EE	6A08	CLRF I,ACCESS
		SYSFORLOOP2
0002F0	2A08	INCF I,F,ACCESS
0002F2	6A09	CLRF I2CBYTE,ACCESS
0002F4	DECF	RCALL HI2CSEND
0002F6	0E1F	MOVLW 31
0002F8	5C08	SUBWF I,W,ACCESS
0002FA	A0D8	BTFSS STATUS, C,ACCESS
0002FC	D7F9	BRA SYSFORLOOP2
		SYSFORLOOPEND2
0002FE	DEE8	RCALL HI2CSTOP
000300	DEDD	RCALL HI2CSTART
000302	0E78	MOVLW 120
000304	6E09	MOVWF I2CBYTE,ACCESS
000306	DEC6	RCALL HI2CSEND
000308	0E40	MOVLW 64
00030A	6E09	MOVWF I2CBYTE,ACCESS
00030C	DEC3	RCALL HI2CSEND
00030E	6A08	CLRF I,ACCESS
		SYSFORLOOP3
000310	2A08	INCF I,F,ACCESS
000312	6A09	CLRF I2CBYTE,ACCESS
000314	DEBF	RCALL HI2CSEND
000316	0E1F	MOVLW 31
000318	5C08	SUBWF I,W,ACCESS
00031A	A0D8	BTFSS STATUS, C,ACCESS
00031C	D7F9	BRA SYSFORLOOP3
		SYSFORLOOPEND3
00031E	DED8	RCALL HI2CSTOP
000320	DECD	RCALL HI2CSTART
000322	0E78	MOVLW 120
000324	6E09	MOVWF I2CBYTE,ACCESS
000326	DEB6	RCALL HI2CSEND
000328	0E40	MOVLW 64
00032A	6E09	MOVWF I2CBYTE,ACCESS
00032C	DEB3	RCALL HI2CSEND
00032E	6A08	CLRF I,ACCESS
		SYSFORLOOP4
000330	2A08	INCF I,F,ACCESS
000332	6A09	CLRF I2CBYTE,ACCESS
000334	DEAF	RCALL HI2CSEND
000336	0E1F	MOVLW 31
000338	5C08	SUBWF I,W,ACCESS
00033A	A0D8	BTFSS STATUS, C,ACCESS
00033C	D7F9	BRA SYSFORLOOP4
		SYSFORLOOPEND4
00033E	DEC8	RCALL HI2CSTOP
000340	DEBD	RCALL HI2CSTART
000342	0E78	MOVLW 120
000344	6E09	MOVWF I2CBYTE,ACCESS
000346	DEA6	RCALL HI2CSEND
000348	0E40	MOVLW 64
00034A	6E09	MOVWF I2CBYTE,ACCESS
00034C	DEA3	RCALL HI2CSEND
00034E	6A08	CLRF I,ACCESS
		SYSFORLOOP5
000350	2A08	INCF I,F,ACCESS
000352	6A09	CLRF I2CBYTE,ACCESS
000354	DE9F	RCALL HI2CSEND
000356	0E1F	MOVLW 31
000358	5C08	SUBWF I,W,ACCESS
00035A	A0D8	BTFSS STATUS, C,ACCESS
00035C	D7F9	BRA SYSFORLOOP5
		SYSFORLOOPEND5
00035E	DEB8	RCALL HI2CSTOP
000360	DEAD	RCALL HI2CSTART
000362	0E78	MOVLW 120
000364	6E09	MOVWF I2CBYTE,ACCESS
000366	DE96	RCALL HI2CSEND
000368	0E40	MOVLW 64
00036A	6E09	MOVWF I2CBYTE,ACCESS
00036C	DE93	RCALL HI2CSEND
00036E	6A08	CLRF I,ACCESS
		SYSFORLOOP6
000370	2A08	INCF I,F,ACCESS
000372	6A09	CLRF I2CBYTE,ACCESS
000374	DE8F	RCALL HI2CSEND
000376	0E1F	MOVLW 31
000378	5C08	SUBWF I,W,ACCESS
00037A	A0D8	BTFSS STATUS, C,ACCESS
00037C	D7F9	BRA SYSFORLOOP6
		SYSFORLOOPEND6
00037E	DEA8	RCALL HI2CSTOP
000380	DE9D	RCALL HI2CSTART
000382	0E78	MOVLW 120
000384	6E09	MOVWF I2CBYTE,ACCESS
000386	DE86	RCALL HI2CSEND
000388	0E40	MOVLW 64
00038A	6E09	MOVWF I2CBYTE,ACCESS
00038C	DE83	RCALL HI2CSEND
00038E	6A08	CLRF I,ACCESS
		SYSFORLOOP7
000390	2A08	INCF I,F,ACCESS
000392	6A09	CLRF I2CBYTE,ACCESS
000394	DE7F	RCALL HI2CSEND
000396	0E1F	MOVLW 31
000398	5C08	SUBWF I,W,ACCESS
00039A	A0D8	BTFSS STATUS, C,ACCESS
00039C	D7F9	BRA SYSFORLOOP7
		SYSFORLOOPEND7
00039E	DE98	RCALL HI2CSTOP
0003A0	DE8D	RCALL HI2CSTART
0003A2	0E78	MOVLW 120
0003A4	6E09	MOVWF I2CBYTE,ACCESS
0003A6	DE76	RCALL HI2CSEND
0003A8	0E40	MOVLW 64
0003AA	6E09	MOVWF I2CBYTE,ACCESS
0003AC	DE73	RCALL HI2CSEND
0003AE	6A08	CLRF I,ACCESS
		SYSFORLOOP8
0003B0	2A08	INCF I,F,ACCESS
0003B2	6A09	CLRF I2CBYTE,ACCESS
0003B4	DE6F	RCALL HI2CSEND
0003B6	0E1F	MOVLW 31
0003B8	5C08	SUBWF I,W,ACCESS
0003BA	A0D8	BTFSS STATUS, C,ACCESS
0003BC	D7F9	BRA SYSFORLOOP8
		SYSFORLOOPEND8
0003BE	DE88	RCALL HI2CSTOP
0003C0	DE7D	RCALL HI2CSTART
0003C2	0E78	MOVLW 120
0003C4	6E09	MOVWF I2CBYTE,ACCESS
0003C6	DE66	RCALL HI2CSEND
0003C8	0E40	MOVLW 64
0003CA	6E09	MOVWF I2CBYTE,ACCESS
0003CC	DE63	RCALL HI2CSEND
0003CE	6A08	CLRF I,ACCESS
		SYSFORLOOP9
0003D0	2A08	INCF I,F,ACCESS
0003D2	6A09	CLRF I2CBYTE,ACCESS
0003D4	DE5F	RCALL HI2CSEND
0003D6	0E1F	MOVLW 31
0003D8	5C08	SUBWF I,W,ACCESS
0003DA	A0D8	BTFSS STATUS, C,ACCESS
0003DC	D7F9	BRA SYSFORLOOP9
		SYSFORLOOPEND9
0003DE	DE78	RCALL HI2CSTOP
0003E0	DE6D	RCALL HI2CSTART
0003E2	0E78	MOVLW 120
0003E4	6E09	MOVWF I2CBYTE,ACCESS
0003E6	DE56	RCALL HI2CSEND
0003E8	0E40	MOVLW 64
0003EA	6E09	MOVWF I2CBYTE,ACCESS
0003EC	DE53	RCALL HI2CSEND
0003EE	6A08	CLRF I,ACCESS
		SYSFORLOOP10
0003F0	2A08	INCF I,F,ACCESS
0003F2	6A09	CLRF I2CBYTE,ACCESS
0003F4	DE4F	RCALL HI2CSEND
0003F6	0E1F	MOVLW 31
0003F8	5C08	SUBWF I,W,ACCESS
0003FA	A0D8	BTFSS STATUS, C,ACCESS
0003FC	D7F9	BRA SYSFORLOOP10
		SYSFORLOOPEND10
0003FE	DE68	RCALL HI2CSTOP
000400	DE5D	RCALL HI2CSTART
000402	0E78	MOVLW 120
000404	6E09	MOVWF I2CBYTE,ACCESS
000406	DE46	RCALL HI2CSEND
000408	0E40	MOVLW 64
00040A	6E09	MOVWF I2CBYTE,ACCESS
00040C	DE43	RCALL HI2CSEND
00040E	6A08	CLRF I,ACCESS
		SYSFORLOOP11
000410	2A08	INCF I,F,ACCESS
000412	6A09	CLRF I2CBYTE,ACCESS
000414	DE3F	RCALL HI2CSEND
000416	0E1F	MOVLW 31
000418	5C08	SUBWF I,W,ACCESS
00041A	A0D8	BTFSS STATUS, C,ACCESS
00041C	D7F9	BRA SYSFORLOOP11
		SYSFORLOOPEND11
00041E	DE58	RCALL HI2CSTOP
000420	DE4D	RCALL HI2CSTART
000422	0E78	MOVLW 120
000424	6E09	MOVWF I2CBYTE,ACCESS
000426	DE36	RCALL HI2CSEND
000428	0E40	MOVLW 64
00042A	6E09	MOVWF I2CBYTE,ACCESS
00042C	DE33	RCALL HI2CSEND
00042E	6A08	CLRF I,ACCESS
		SYSFORLOOP12
000430	2A08	INCF I,F,ACCESS
000432	6A09	CLRF I2CBYTE,ACCESS
000434	DE2F	RCALL HI2CSEND
000436	0E1F	MOVLW 31
000438	5C08	SUBWF I,W,ACCESS
00043A	A0D8	BTFSS STATUS, C,ACCESS
00043C	D7F9	BRA SYSFORLOOP12
		SYSFORLOOPEND12
00043E	DE48	RCALL HI2CSTOP
000440	DE3D	RCALL HI2CSTART
000442	0E78	MOVLW 120
000444	6E09	MOVWF I2CBYTE,ACCESS
000446	DE26	RCALL HI2CSEND
000448	0E40	MOVLW 64
00044A	6E09	MOVWF I2CBYTE,ACCESS
00044C	DE23	RCALL HI2CSEND
00044E	6A08	CLRF I,ACCESS
		SYSFORLOOP13
000450	2A08	INCF I,F,ACCESS
000452	6A09	CLRF I2CBYTE,ACCESS
000454	DE1F	RCALL HI2CSEND
000456	0E1F	MOVLW 31
000458	5C08	SUBWF I,W,ACCESS
00045A	A0D8	BTFSS STATUS, C,ACCESS
00045C	D7F9	BRA SYSFORLOOP13
		SYSFORLOOPEND13
00045E	DE38	RCALL HI2CSTOP
000460	DE2D	RCALL HI2CSTART
000462	0E78	MOVLW 120
000464	6E09	MOVWF I2CBYTE,ACCESS
000466	DE16	RCALL HI2CSEND
000468	0E40	MOVLW 64
00046A	6E09	MOVWF I2CBYTE,ACCESS
00046C	DE13	RCALL HI2CSEND
00046E	6A08	CLRF I,ACCESS
		SYSFORLOOP14
000470	2A08	INCF I,F,ACCESS
000472	6A09	CLRF I2CBYTE,ACCESS
000474	DE0F	RCALL HI2CSEND
000476	0E1F	MOVLW 31
000478	5C08	SUBWF I,W,ACCESS
00047A	A0D8	BTFSS STATUS, C,ACCESS
00047C	D7F9	BRA SYSFORLOOP14
		SYSFORLOOPEND14
00047E	DE28	RCALL HI2CSTOP
000480	DE1D	RCALL HI2CSTART
000482	0E78	MOVLW 120
000484	6E09	MOVWF I2CBYTE,ACCESS
000486	DE06	RCALL HI2CSEND
000488	0E40	MOVLW 64
00048A	6E09	MOVWF I2CBYTE,ACCESS
00048C	DE03	RCALL HI2CSEND
00048E	6A08	CLRF I,ACCESS
		SYSFORLOOP15
000490	2A08	INCF I,F,ACCESS
000492	6A09	CLRF I2CBYTE,ACCESS
000494	DDFF	RCALL HI2CSEND
000496	0E1F	MOVLW 31
000498	5C08	SUBWF I,W,ACCESS
00049A	A0D8	BTFSS STATUS, C,ACCESS
00049C	D7F9	BRA SYSFORLOOP15
		SYSFORLOOPEND15
00049E	DE18	RCALL HI2CSTOP
0004A0	DE0D	RCALL HI2CSTART
0004A2	0E78	MOVLW 120
0004A4	6E09	MOVWF I2CBYTE,ACCESS
0004A6	DDF6	RCALL HI2CSEND
0004A8	0E40	MOVLW 64
0004AA	6E09	MOVWF I2CBYTE,ACCESS
0004AC	DDF3	RCALL HI2CSEND
0004AE	6A08	CLRF I,ACCESS
		SYSFORLOOP16
0004B0	2A08	INCF I,F,ACCESS
0004B2	6A09	CLRF I2CBYTE,ACCESS
0004B4	DDEF	RCALL HI2CSEND
0004B6	0E1F	MOVLW 31
0004B8	5C08	SUBWF I,W,ACCESS
0004BA	A0D8	BTFSS STATUS, C,ACCESS
0004BC	D7F9	BRA SYSFORLOOP16
		SYSFORLOOPEND16
0004BE	DE08	RCALL HI2CSTOP
0004C0	DDFD	RCALL HI2CSTART
0004C2	0E78	MOVLW 120
0004C4	6E09	MOVWF I2CBYTE,ACCESS
0004C6	DDE6	RCALL HI2CSEND
0004C8	0E40	MOVLW 64
0004CA	6E09	MOVWF I2CBYTE,ACCESS
0004CC	DDE3	RCALL HI2CSEND
0004CE	6A08	CLRF I,ACCESS
		SYSFORLOOP17
0004D0	2A08	INCF I,F,ACCESS
0004D2	6A09	CLRF I2CBYTE,ACCESS
0004D4	DDDF	RCALL HI2CSEND
0004D6	0E14	MOVLW 20
0004D8	5C08	SUBWF I,W,ACCESS
0004DA	A0D8	BTFSS STATUS, C,ACCESS
0004DC	D7F9	BRA SYSFORLOOP17
		SYSFORLOOPEND17
0004DE	D5F8	BRA HI2CSTOP


18F4550_1306.lst (37,210 bytes)   
18F4550_1306.html (1,775 bytes)   
<!DOCTYPE html>
<html>
<head>
<title>Compilation Report</title>
</head>
<body>
<h1>Compilation Report</h1>
<p>Compiler Version (YYYY-MM-DD): 1.00.00 2023-05-31 (Windows 64 bit) : Build 1249</p><p>Finding Great Cow BASIC useful ? Please goto to https://sourceforge.net/projects/gcbasic/reviews/new?stars=5 and provide feedback to share your experience.</p>
<h2>Compilation time</h2>
<p> (Compile time: 1.816406 seconds)</p>
<p> (Assembly time: 0.046875 seconds)</p>
<p> (Download time: 0 seconds)</p>
<p> (Total time: 1.863281 seconds)</p>
<h2>Chip resource usage:</h2>
<p>Chip Model: 18F4550</p>
<p>Program Memory: 845/16384 words (5.16%)</p>
<p>RAM: 5/2048 bytes (.24%)</p>
<p> OSC: INTOSCIO_EC, 8Mhz (Internal oscillator)</p>
<h2>RAM Allocation</h2>
<table border="1">
</table>
<h2>Subroutines</h2>
<table border="1">
<tr><th>Name</th><th>Code Size (lines)</th><th>Compiled Size (words)</th><th>Outgoing calls</th></tr>
<tr><td>Main</td><td>15</td><td>21</td><td>HI2CINIT(1), Delay_S(1), SENDT(1), HI2CMODE(1), INITSYS(35)</td></tr>
<tr><td>SENDT</td><td>212</td><td>671</td><td>HI2CSTOP(31), HI2CSEND(116), HI2CSTART(31)</td></tr>
<tr><td>INITSYS</td><td>895</td><td>21</td><td></td></tr>
<tr><td>HI2CMODE</td><td>27</td><td>33</td><td></td></tr>
<tr><td>HI2CSTART</td><td>22</td><td>14</td><td>HI2CWAITMSSP(1)</td></tr>
<tr><td>HI2CSTOP</td><td>14</td><td>18</td><td>HI2CWAITMSSP(1)</td></tr>
<tr><td>HI2CSEND</td><td>19</td><td>25</td><td>HI2CWAITMSSP(1)</td></tr>
<tr><td>HI2CWAITMSSP</td><td>20</td><td>12</td><td></td></tr>
<tr><td>HI2CINIT</td><td>4</td><td>2</td><td></td></tr>
<tr><td>Delay_MS</td><td>0</td><td>18</td><td></td></tr>
<tr><td>Delay_S</td><td>0</td><td>10</td><td>Delay_MS(1)</td></tr>
</table>
</body>
</html>
18F4550_1306.html (1,775 bytes)   

evanvennn

2023-08-28 06:33

administrator   ~0000188

The root cause was compiler was not TRIMing() the I2CADDRESS constant correctly. Corrected in build 1258/

Issue History

Date Modified Username Field Change
2023-07-06 22:56 anonymous New Issue
2023-08-28 06:33 evanvennn Status new => resolved
2023-08-28 06:33 evanvennn Resolution open => fixed
2023-08-28 06:33 evanvennn Note Added: 0000188
2023-09-01 06:10 angel-spartan Target Version => 1.01.018
2023-09-01 06:10 angel-spartan Fixed in Version => 1.01.018
2023-09-01 06:24 angel-spartan Status resolved => closed