Jump to content

RSABear

EstablishedMember
  • Content count

    75
  • Joined

  • Last visited

Community Reputation

0 Neutral

About RSABear

  • Rank
    Regular
  • Birthday 09/21/1965

Profile Information

  • Gender
    Male
  • Location
    Johannesburg
  1. I2c Slaves Read

    Follow my sample code posted here and you will fix the problem: http://forum.sourceboost.com/index.php?showtopic=4531
  2. Eeprom.pic.lib Broken In V6.96

    Reynard, thank you so much for the help. There is a single instruction missing in the EE_Get_Int(). The fix is, the "eecon1.CFGS = false;": Kind Regards Bernard
  3. Yes, the code is old, i have not used/updated it for while. I have swopped bits 1 and 2 in the following definitions. #define state_3 0b00001100 // State 3 (0x0C) - SSPSTAT bits: D_A = 0, S = 1, R_W = 1, BF = 0 #define state_4 0b00101100 // State 4 (0x2C) - SSPSTAT bits: D_A = 1, S = 1, R_W = 1, BF = 0 the bug results in a State of 0x0A and 0x2C, which will not allow you to read data from the slave correctly. > My apologies, I did not update the version and date in the source file which I uploaded (after I made the corrections).
  4. I now have the I2C_Slave working on the 16F88. See the downloadable demo code, processor config is straight forward. and review this post: I2C Bug Report
  5. Hi all - I found a bug in my I2C Slave demo code. State 3 & 4 are incorrectly defined. The following lines of code corrects the bug: #define SSPSTAT_BIT_MASK 0b00101101 // Mask for I2C status bits // bit 0 BF: Buffer Full Status bit // bit 2 R/W: Read/Write bit Information (I2C mode only) // bit 3 S: START bit // bit 5 D/A: Data/Address bit (I2C mode only) // AN734a DS00734A-page 10 - Definitions for Older Devices //--------------------------------------------------------------------- // The I2C code below checks for 5 states: // S 1 = Start condition occuurred last // R/W 0 = Master writing data to Slave 1 = Master reading from Slave // D/A 0 = Last Byte was an Address 1 = Last Byte was Data // BF 0 = Buffer Empty 1 = Buffer Full //--------------------------------------------------------------------- // The following table on AN734a DS00734A-page 10 // State 1: I2C write operation, last byte was an address byte. // SSPSTAT bits: S = 1, D_A = 0, R_W = 0, BF = 1 // State 2: I2C write operation, last byte was a data byte. // SSPSTAT bits: S = 1, D_A = 1, R_W = 0, BF = 1 // State 3: I2C read operation, last byte was an address byte. // SSPSTAT bits: S = 1, D_A = 0, R_W = 1, BF = 0 // State 4: I2C read operation, last byte was a data byte. // SSPSTAT bits: S = 1, D_A = 1, R_W = 1, BF = 0 // State 5: Slave I2C logic reset by NACK from master. // SSPSTAT bits: S = 1, D_A = 1, R_W = 0, BF = 0 //---------------------------------------------------------------------- // 76543210 // XXDXSRXB #define state_1 0b00001001 // State 1 (0x09) - SSPSTAT bits: D_A = 0, S = 1, R_W = 0, BF = 1 #define state_2 0b00101001 // State 2 (0x29) - SSPSTAT bits: D_A = 1, S = 1, R_W = 0, BF = 1 #define state_3 0b00001100 // State 3 (0x0C) - SSPSTAT bits: D_A = 0, S = 1, R_W = 1, BF = 0 #define state_4 0b00101100 // State 4 (0x2C) - SSPSTAT bits: D_A = 1, S = 1, R_W = 1, BF = 0 #define state_5 0b00101000 // State 5 (0x28) - SSPSTAT bits: D_A = 1, S = 1, R_W = 0, BF = 0 Code_877A_1.c
  6. Hi all, Bit of an old thread, but... Have you ever made this Slave code work? I am busy porting my 16F887 Slave code to 16F88 and scanning the forums for any issues... Please - let me know.
  7. Before I post this question on the dreaded Microchip Forum, I would like to see if somebody else ran into this problem. For the first time I would like to build a project in Microchip MPLAB V8.36 which has include files and library files in different directories. I have added the –I and –obj switches to the BoostC compiler. For the source files located outside the project directory, one needs to uncheck the “Inherit Global Settings” checkbox under the Build Options and hit the apply button, but there seems to be a bug there as the settings does not get saved by MPLAB and the Apply Button plays up - you need to check and uncheck the button to enable the Apply Button. Is there a way to configure the setting somewhere else? OR How do you setup a project for source files in multiple directories to compile successfully, it seem to be the root of the problem, rather than the above. AND Editing the project.mcp file does not work either, the sub directories are ignored.
  8. Sd Memory Card

    It is going to be a FAT help, it will do the trick. Thank you.
  9. Sd Memory Card

    I have been using 24FC512 EEPROMS. Now I need much more memory space. Can anyone help or has anyone written C code for a SD Memory card I can use to get me started?
  10. 18f4550 Reset/reboot

    Excellent! I somehow missed it in the header file....
  11. 18f4550 Reset/reboot

    I would like to software reset/reboot the 18F4550. Can someone point me in the right direction? For the 16F chips I used the following code:
  12. Tv Remote

    Yes it does. Receive and Transmit. I build the 3 channel IR transmitter form sixca and the receiver from code on the EDABOARD website. There are 100s of sites with schematics, code and information.
  13. Hi Ian, I constructed my board last weekend and tested the hardware with the Microchip Bootloader & MCHPFSUSB Demo code. The hardware works fine for the MCHPFSUSB demo. I have not tested the Micochip CDC firmware on the board. I have compile the PIC Pack Rc1 demo however, it does not enumerate on the USB Bus (yet). The RS232 portion works, I get the messages and can input the a command. I don't attach to the USB - and when I de-attach I get to: serial_print_str(" don't own it! "); Can you recommend a USB Sniffer to use in order so see if data is flowing IN/OUT and help to start the debug process? I also assume that when we enumerate we are going to use the CDC driver form (which will then create a standard serial port): x:\MCHPFSUSB\fw\CDC\inf\win2k_winxp I attach my schematic and board for reference and for other users who would like to get started with USB. Anyway - it is exciting stuff, the posibilities are great. Let's see how we go forward.
  14. Thanks Ian - I got it this morning.
  15. Usb.lib?

    I have done so. I also included the schematic of the USB Test Board I have build. RSABear
×