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 24 matches
CCS Forum Index
Author Message
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Tue Apr 02, 2013 10:02 pm   Subject: 18F26J50 SPI and USART2 now working, modified program
Ttelmah,
I kept hammering on this code until it works now.
Some things look strange in the code ,,, but it works, sending data at 4800 baud to the Comm Operator program and sending data via SPI t ...
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Tue Apr 02, 2013 2:27 pm   Subject: SPI not working on 18F26J50
Moderator: ok, I will highlight the 'code' and press the code button as instructed. Hope it works.

Ttelmah,
Somehow I got the board working again.
Your suggestions have been implimented with app ...
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Tue Apr 02, 2013 11:54 am   Subject: SPI and UART2 test code for 18F26J50

++++++++++++++++++++++++++
Jim, please learn to use Code blocks. Mod is tired of doing it for you.

Highlight code lines with mouse.
Press Code button.
Preview to check it, and post.

Edit t ...
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Tue Apr 02, 2013 9:49 am   Subject: SPI and UART1
Hi Ttelmah,

Thank you for making it clear about the relation between spi and uart1.
I have made sure your directives are implemented.

But it seems that I am making very large strides backwa ...
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Mon Apr 01, 2013 8:47 pm   Subject: spi_write() no clock...
jeremiah,
As far as I know, with this simple program, I do not have any extra
peripherals using the same pins as the SPI interface.
It seems that it is possible to get the spi running, or th ...
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Mon Apr 01, 2013 8:38 pm   Subject: List file section for spi_write
jeremiah, here is the list for spi_write:

.................... spi_write('X'); // recompile, now not hanging, but no clock signal. ?
00FA: MOVF FC9,W
00FC: MOVLW ...
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Mon Apr 01, 2013 8:28 pm   Subject: Versions
Using Versions:
PCW versions:
IDE 4.138
PCB 4.138
PCM 4.141
PCH 4.141
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Mon Apr 01, 2013 8:08 pm   Subject: Code for the 18F26J50 to use USART2 and spi_write() together
jeremiah,
Thank you for the test code. Most appreciated.
I used your code and included LEDs for DeBug.
The code hangs on spi_write('X') . (Green LED stays on)
The pin assignments work, and da ...
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Mon Apr 01, 2013 4:30 pm   Subject: "hello world" is working, but now the SPI does not
Hello Ttelmah,
The "hello world" is working, but now the SPI does not work.
Redirecting pin assignments seem to work.

Prior to adding the "hello world" the SPI WAS working.
S ...
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Mon Apr 01, 2013 6:52 am   Subject: SPI not working on 18F26J50, but TX2 using fputc('x') hangs
Dear Ttelmah,
I tried as you suggested using fputc(char) ... but the program hangs right there. This is strange. Looking up fputc in the new PCW compiler manual on page 175 does not seem to have an ...
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Sun Mar 31, 2013 11:20 pm   Subject: SPI not working on 18F26J50
Support,
Thank you for the suggested code to get SPI running.
The SPI does output data now, but the reassignment of UART2 port pins to C0 and C1 does not seem to work. Is is something with the Tri ...
  Topic: SPI not working on 18F26J50
Jim Oram

Replies: 18
Views: 22255

PostForum: General CCS C Discussion   Posted: Sat Mar 30, 2013 7:31 am   Subject: SPI not working on 18F26J50
Support, using my new PCW compiler:
For several days I have been trying to get the SPI to work on a 18F26J50, (28 pin dip).
I am using:

#use SPI (MASTER, di=pin_b5, do=pin_c7, clk=pin_b4&# ...
  Topic: Problem using 12F510 A/D and GP ports
Jim Oram

Replies: 5
Views: 10066

PostForum: General CCS C Discussion   Posted: Mon Feb 20, 2012 10:11 pm   Subject: 12F510 code corrections:
Ttelmah, Your point of using bit vars is well taken. I will do that.

Your recommended sample code works well. Thank you. However it did not work at first try, the variable state=1; was the same in ...
  Topic: Problem using 12F510 A/D and GP ports
Jim Oram

Replies: 5
Views: 10066

PostForum: General CCS C Discussion   Posted: Mon Feb 20, 2012 6:39 am   Subject: Problem with 12F510 and GP ports
Hello Ttelmah, Thank you very kindly for the reply and sample code.
I will try it very soon, ....but first I will give you the variable definitions.... in case I have a problem there:

// ...
  Topic: Problem using 12F510 A/D and GP ports
Jim Oram

Replies: 5
Views: 10066

PostForum: General CCS C Discussion   Posted: Mon Feb 20, 2012 1:03 am   Subject: Problem using 12F510 A/D and GP ports
12F510:
Concerning a new project design I have to do using the 12F510, I am having a "head banger time" trying to get GP ports to work and the fact that the A/D brings in erratic values fr ...
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group