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

Search found 163 matches
CCS Forum Index
Author Message
  Topic: SPI 16B address and 8b data
beaker404

Replies: 3
Views: 15581

PostForum: General CCS C Discussion   Posted: Mon Aug 15, 2022 1:14 pm   Subject: SPI 16B address and 8b data
thanks.
Not sure how I missed that in the datasheet,
  Topic: SPI 16B address and 8b data
beaker404

Replies: 3
Views: 15581

PostForum: General CCS C Discussion   Posted: Mon Aug 15, 2022 12:22 pm   Subject: SPI 16B address and 8b data
sorry for the poor formatting of the thread, for some reason I cannot edit it now correctly.
  Topic: SPI 16B address and 8b data
beaker404

Replies: 3
Views: 15581

PostForum: General CCS C Discussion   Posted: Mon Aug 15, 2022 12:20 pm   Subject: SPI 16B address and 8b data
CCS 5.064
PIC18F26K22
EEPROM 93LC66C

Looked around the forum and nothing came out as an exact solution to my problem,
problem being, using a 93LC66 in 8b data mode so 512 x 8 bytes.
Communicat ...
  Topic: Two SPI streams, same mode
beaker404

Replies: 7
Views: 23307

PostForum: General CCS C Discussion   Posted: Fri Jul 08, 2022 3:24 pm   Subject: Two SPI streams, same mode
True, I did only change one thing at a time, just posting where I was at when it all started working, I will start taking other stuff out.
I bit bang the CS pins.
  Topic: Two SPI streams, same mode
beaker404

Replies: 7
Views: 23307

PostForum: General CCS C Discussion   Posted: Fri Jul 08, 2022 2:27 pm   Subject: Two SPI streams, same mode
OK
Here is what worked and everyone (Tilt Sensor and EEPROM) are being nice neighbors and working correctly now.

#use spi(master, DO=Pin_B3, CLK=PIN_B1, DI=PIN_B2 ,mode=0, baud=2000000, stream ...
  Topic: Two SPI streams, same mode
beaker404

Replies: 7
Views: 23307

PostForum: General CCS C Discussion   Posted: Fri Jul 08, 2022 1:22 pm   Subject: Two SPI streams, same mode
Probably doing this wrong, but here is how I interpreted your comment:

#use spi(master, SPI2, mode=0, baud=2000000, stream=SPI2_TILT, bits=32, MSB_FIRST) // SPI Call for Tilt Sensor
#use s ...
  Topic: Two SPI streams, same mode
beaker404

Replies: 7
Views: 23307

PostForum: General CCS C Discussion   Posted: Fri Jul 08, 2022 12:55 pm   Subject: Two SPI streams, same mode
PIC18F26K22
CCS version 5.094

Tilt sensor SCL3300
EEPROM 93LC66 in 8bit mode

I have the above two devices on SPI2 of a 18F26K22.

my SPI set up is as follows:

#use spi(master, SPI2 ...
  Topic: SCL3300
beaker404

Replies: 10
Views: 34009

PostForum: General CCS C Discussion   Posted: Thu Aug 12, 2021 12:15 pm   Subject: SCL3300

You need to raise the CS after each four byte transfer. It is the act of
raising this and then lowering it that specifies this is a new command.


So every four byte transfer, meaning every time ...
  Topic: SCL3300
beaker404

Replies: 10
Views: 34009

PostForum: General CCS C Discussion   Posted: Thu Aug 12, 2021 9:59 am   Subject: SCL3300
Ttelmah, can you expand on your following code and comment.



struct SCLdata {
//beware bitfield are allocated LSB first
uint8_t RS:2; //RS reply
uint8_t ADDR:5; //address
uint8_t ...
  Topic: SCL3300
beaker404

Replies: 10
Views: 34009

PostForum: General CCS C Discussion   Posted: Thu Aug 12, 2021 8:25 am   Subject: SCL3300
Here are some code snippets of my setup followed by a discussion of the data I get back. I am using a CS line that I control with output_high() output_low() commands.


#device PIC18f25k22

#fus ...
  Topic: SCL3300
beaker404

Replies: 10
Views: 34009

PostForum: General CCS C Discussion   Posted: Thu Aug 12, 2021 7:05 am   Subject: SCL3300
Thanks for the tips. I have been employing a lot of what was suggested here. I am working with the WHOAMI command for verification as well as working with the initialization steps outlined on page 21 ...
  Topic: SCL3300
beaker404

Replies: 10
Views: 34009

PostForum: General CCS C Discussion   Posted: Wed Aug 11, 2021 2:48 pm   Subject: SCL3300
Working with the Murata SCL3300 tilt sensor.
Anyone seen any example code or instructions on getting going with this chip?
The SPI bus is working and working with 32b. I am just not getting the add ...
  Topic: Slave SPI
beaker404

Replies: 14
Views: 42281

PostForum: General CCS C Discussion   Posted: Thu Jul 29, 2021 4:42 pm   Subject: Slave SPI
OK, burned another day on SPI between two pics,
broke camp on using spi_read and spi_write.
did code for using SPI_XFER and #USE SPI()

what is happening now is, I get all 1s sent. My signals, i. ...
  Topic: Slave SPI
beaker404

Replies: 14
Views: 42281

PostForum: General CCS C Discussion   Posted: Wed Jul 28, 2021 1:27 pm   Subject: Slave SPI
Unless someone has some insight, I am tapping out and designing this portion out. Resistors made no difference. Does not make sense, SPI running all over this board, just not this one. I hate the ...
  Topic: Slave SPI
beaker404

Replies: 14
Views: 42281

PostForum: General CCS C Discussion   Posted: Wed Jul 28, 2021 11:25 am   Subject: Slave SPI
Ttelmah I agree on the data rates should work, I go about the same distance and much faster with SPI on the same board. I tried the other SPI modes and no improvement.
last effort will be series res ...
 
Page 1 of 11 Goto page 1, 2, 3 ... 9, 10, 11  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group