Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Oh god that is too much time.I thought I2C is really speed but its too slow.But in all over the world it is using I don't know why they using if it too slow.
Nigel can you give me an idea on how to do this.
I get a string of characters from a PC (over 200-300 characters).I want to save these characters for later use.How can I achieve this?
I have not decided the PIC yet what ever you all suggest I can use it
Now here the problem comes.
Let say I'm receiving 300 characters & I have 200 free RAM .So I'll receive UART characters & save them in GP RAM.After receiving I start writing to 24C08 then it will take 13mS X 200 = 2600mS time,this will miss many characters in the balance 100 receiving characters.
Byte and block write take the same time.
;================================================================
;write the data to the 24C08
;70h-7Fh contains data
;================================================================
Write_24C08 movlw b'00000100' ; Write from 0x04
movwf E2_Add_Low
clrf E2_Add_High
movlw 70h
movwf FSR
movlw .16
movwf Byte_Count ; write 16 bytes at once
call I2C_Page_Write
---
---
I2C_Page_Write call I2C_Start
rlf E2_Add_High,W
andlw b'00001110'
iorlw b'10100000' ; Slave Address - WR
call I2C_Write
movf E2_Add_Low,W
call I2C_Write
;
Page_Write_Loop movf INDF,W
call I2C_Write
incf FSR,F
decfsz Byte_Count,F
goto Page_Write_Loop
call I2C_Stop
call Delay10
return
;==============================================
;Show the written data on the display
;==============================================
Show_Setup movlw .16
movwf Byte_Count
movlw b'00000100'
movwf E2_Add_Low
;
Show_Loop call I2C_Byte_Read
movwf Number
call Display_Number ; show on LED's
call Delay255
call Delay255
call Delay255
call Delay255
incf E2_Add_Low,F ; increment E2 Pointer
decfsz Byte_Count,F
goto Show_Loop
goto Show_Setup
I2C_Byte_Read call I2C_Start
movlw b'10100000' ; Slave Address - WR
call I2C_Write
movf E2_Add_Low,W
call I2C_Write
call I2C_Restart
movlw b'10100001' ; Slave Address - Read
call I2C_Write
call I2C_Read
movf SSPBUF,W
call NACK_Slave
call I2C_Stop
return