Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 15:57 19 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Need help with SPI CFunction/CSub

Author Message
Justplayin

Guru

Joined: 31/01/2014
Location: United States
Posts: 313
Posted: 02:51pm 15 Feb 2016
Copy link to clipboard 
Print this post

After a couple of weeks I've managed to go from knowing absolutely nothing about C to knowing nearly nothing. Well, maybe a little more than that. I can pass data to a C routine and either send back a result or modify the original data and I can even toggle some pin states. What I really need to do is output data using the SPI port. The only example I have is Peter Mather's OLED CFunction and I can't seem to figure it out. What I have written so far compiles and it doesn't crash the 'Mite but it also doesn't produce any working result. Does anyone have any SPI CFuncition/CSub code they would share? I'm hoping another example (or 2) may help back on track.


Thanks,
Curtis
I am not a Mad Scientist...  It makes me happy inventing new ways to take over the world!!
 
Justplayin

Guru

Joined: 31/01/2014
Location: United States
Posts: 313
Posted: 03:41pm 16 Feb 2016
Copy link to clipboard 
Print this post

Success!!! I have SPI data flowing from a CFunction! Finally traced my problem to a bad set of for loops in the function. My counters were not counting which caused the calculations to not calculate.

--Curtis
I am not a Mad Scientist...  It makes me happy inventing new ways to take over the world!!
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 04:07pm 16 Feb 2016
Copy link to clipboard 
Print this post

Curtis, I am sorry I couldn't assist with your problem but I am glad you were able to sort it out. It sounds like you have made great progress with the CFunctions and C. This is something I wish to attempt in the near future.
GM
 
Justplayin

Guru

Joined: 31/01/2014
Location: United States
Posts: 313
Posted: 07:45pm 16 Feb 2016
Copy link to clipboard 
Print this post

  Graeme Meager said  This is something I wish to attempt in the near future.


One thing I would suggest... Have a specific goal (program) in mind, it will help drive you forward. I think it makes things easier to understand when you can apply what you are learning directly to what you want to accomplish.

--Curtis
I am not a Mad Scientist...  It makes me happy inventing new ways to take over the world!!
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024