summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4af7e72)
This slows down the init sequence, allowing stubborn devices to initialize.
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@812
12e2690d-a6be-4b82-a7b7-
67c4a43b65c8
#define MISO BIT2
#define SCK BIT3
#define MISO BIT2
#define SCK BIT3
//This could be more accurate.
//Does it ever need to be?
#define CCSPEED 3
//This could be more accurate.
//Does it ever need to be?
#define CCSPEED 3
-//#define CCDELAY(x) delay(x)
-#define CCDELAY(x)
+#define CCDELAY(x) delay(x)
+//#define CCDELAY(x)
#define SETMOSI P5OUT|=MOSI
#define CLRMOSI P5OUT&=~MOSI
#define SETMOSI P5OUT|=MOSI
#define CLRMOSI P5OUT&=~MOSI
//Two positive debug clock pulses while !RST is low.
//Take RST low, pulse twice, then high.
P5OUT&=~SCK;
//Two positive debug clock pulses while !RST is low.
//Take RST low, pulse twice, then high.
P5OUT&=~SCK;
//Two rising edges.
P5OUT^=SCK; //up
//Two rising edges.
P5OUT^=SCK; //up
P5OUT^=SCK; //Unnecessary.
P5OUT^=SCK; //Unnecessary.
+ delay(1);
+ //delay(0);
//Raise !RST.
P5OUT|=RST;
//Raise !RST.
P5OUT|=RST;