Jump to content

george

Members
  • Content Count

    2
  • Joined

  • Last visited

    Never

Everything posted by george

  1. george

    eeprom demo

    Hi all, first error is in name of function. This function don't write to flash but to eeprom. Flash is used for program. So, I have to add one line to correct this function. char read_flash( char addr ) { //Read flash eeadr = addr; clear_bit( eecon1, EEPGD ); //!!!!!!!! see Microchips docs set_bit( eecon1, RD ); asm movf _eedata, W } Hi George
  2. Hi, I have problems with my project. I have some assembler routines and I want to use them in my C-project. One way is in-line assembler, but in this case compiler is very stupid. See this: ;;;;;;;;asm{ ;;;;;;;; BCF STATUS, 0x0006 ;;;;;;;; BCF STATUS, 0x0005 ; Bank 0 ;;;;;;;; bsf PORTB,5 ;LED ;network activity LED ;;;;;;;; movlw _INBUFFER ;;;;;;;; movwf FSR ;;;;;;;; movlw 0FH ;;;;;;;; movwf _COUNTER ;;;;;;;; bcf STATUS,0x0000 ;;;;;;;; clrwdt ;;;;;;;; clrwdt ;;;;;;;; ;;;;;;;; ;;;;;;;;} bcf STATUS, RP0 bcf STATUS, RP1 BCF STATUS, 0x0006 BCF STATUS, 0x0005 ; B
×
×
  • Create New...