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 support@ccsinfo.com

S1D13700 driver code
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah



Joined: 11 Mar 2010
Posts: 19219

View user's profile Send private message

PostPosted: Tue Nov 26, 2019 9:14 am     Reply with quote

First, you are confusing things by trying to use the 6800 nomenclature for
the pins. The code is written to use the Z80 nomenclature, and assumes
that pins CNF2 & 3 are wired to 0v. Do this and use the Z80
nomenclature. You need AB0 defined and connected. CNF4 needs to
be wired to '1' to setup for indirect I/O.
Look at the table at the bottom of page 10 of the data sheet. This with
CNF4=1, is what the code is written to use. With AB0, RD and WR pins
(and CS).

Then you have ignored my comment about needing to explicitly use
unsigned int8. Every variable and function call, needs to have everything
referring to 'int8' changed to use 'uint8_t' (with stdint.h loaded). reason is
than on the DSPIC's the default variable type is 'signed'. The code needs
everything as 'unsigned'.

Also you are operating the reset line in software. Data sheet says you must
wait at least 3mSec after this line is de-asserted. You need to raise this
and ideally pause for perhaps 5mSec before continuing the initialisation.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group