61
Messages
This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.
Messages - pppd
62
Bus Pirate Support / Re: Controlling CS pin in binary I2C mode
Below is the command itself and all possible parameters for now:
Code: [Select]
//00001001 xxxxxxxxI do have R/W access to the repository from the time I was submitting pirate loader utility, but I would like to get this approved by you before submitting anything.
case 9: //extended AUX command
UART1TX(1); //confirm that the command is known
//inByte - used as extended commmand
//fr - used as result
while(U1STAbits.URXDA == 0);//wait for subcommand byte
inByte=U1RXREG; //get byte
//0x00 - AUX/CS low
//0x01 - AUX/CS high
//0x02 - AUX/CS HiZ
//0x03 - AUX read
//0x10 - use AUX
//0x20 - use CS
fr=1;
switch( inByte ) {
case 0x00:
bpAuxLow(0);
break;
case 0x01:
bpAuxHigh(0);
break;
case 0x02:
bpAuxHiZ(0);
break;
case 0x03:
fr = bpAuxRead();
break;
case 0x10:
modeConfig.altAUX = 0;
break;
case 0x20:
modeConfig.altAUX = 1;
break;
default:
fw = 0;
break;
}
UART1TX(fr);//result
break;
This seems to work perfectly fine and I can finally control my sensors in binary mode. I think the reason is CS pull-up resistor which does not provide enough current to keep the XCLR high.
63
Bus Pirate Support / Re: Controlling CS pin in binary I2C mode
Code: [Select]
void bpAuxHigh(void){
#ifndef BUSPIRATEV4
if(modeConfig.altAUX==0)
{ BP_AUX_DIR=0;//aux output
BP_AUX=1;//aux high
}
else
{ BP_CS_DIR=0;//aux input
BP_CS=1;//aux high
}
#endifAs you can see it does not check for HiZ mode and truly puts the pin in the high state and not just leave it for the pull-ups to keep it up.Below is a snipped from the binary I2C mode:
Code: [Select]
//AUX pin, high/low onlyNow my question is if I could add a new I2C command ( or two ) so I can either control CS directly just like in the text mode.. or control AUX and add alternative AUX selection.
if(inByte&0b10){
BP_AUX_DIR=0;//aux output
BP_AUX=1;//aux high
}else{
BP_AUX_DIR=0;//aux output
BP_AUX=0;//aux low
}
//CS pin, follows HiZ setting
if(inByte&0b1){
if(modeConfig.HiZ==1){
IODIR|=CS; //CS iput in open drain mode
}else{
IOLAT|=CS; //CS high
IODIR&=(~CS); //CS output
}
}else{
IOLAT&=(~CS); //BP_CS=0;
IODIR&=(~CS); //CS output
}
64
Client software / Re: Icon for Logic Sniffer Client on Mac OSX
65
Client software / Re: Icon for Logic Sniffer Client on Mac OSX
I am not sure how to handle Windows/Linux so I will just send you .ico and .png by email ( can you PM your email pls ? )
66
Client software / Re: Icon for Logic Sniffer Client on Mac OSX
Top or the bottom one then :) ?
67
Client software / Re: Icon for Logic Sniffer Client on Mac OSX

I liked the pixel made font more than this one, but let's see what you think about it.
68
Client software / Re: Client beta testers
69
Client software / Re: Icon for Logic Sniffer Client on Mac OSX

Which of the 32x32 would you like to use? Any other suggestions?
70
Client software / Re: Icon for Logic Sniffer Client on Mac OSX
71
Client software / Re: Client beta testers
72
Bus Pirate Support / Re: Controlling CS pin in binary I2C mode
73
Bus Pirate Support / Re: Controlling CS pin in binary I2C mode
[attachment=0]
74
Bus Pirate Support / Re: Controlling CS pin in binary I2C mode
Here's the text mode, and I will get binary log in a minute:
Code: [Select]
HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
9. DIO
x. exit(without change)
(1)>4
Set speed:
1. ~5KHz
2. ~50KHz
3. ~100KHz
4. ~400KHz
(1)>1
Ready
I2C>W
Power supplies ON
I2C>P
Pull-up resistors ON
I2C>g
1KHz-4,000KHz PWM
Frequency in KHz
(50)>32
Duty cycle in %
(50)>50
PWM active
I2C>C
a/A/@ controls CS pin
I2C>A %:2 [0xEE 0xFF 0xF0] %:50 [0xEE 0xFD[0xEF r:2] a
AUX HIGH
DELAY 2ms
I2C START BIT
WRITE: 0xEE ACK
WRITE: 0xFF ACK
WRITE: 0xF0 ACK
I2C STOP BIT
DELAY 50ms
I2C START BIT
WRITE: 0xEE ACK
WRITE: 0xFD ACK
I2C START BIT
WRITE: 0xEF ACK
READ: 0xB4 ACK 0xAD
NACK
I2C STOP BIT
AUX LOW
I2C>
75
Bus Pirate Support / Re: Controlling CS pin in binary I2C mode
But I do use the 0100wxyz command already.. and it doesn't help. The real problem is.. why it does work in the text mode and then it fails in binary. As I said logic sniffer captures CS as HIGH both in text/binary modes.. but there must be either a bug in my code or a difference in behavior.
My code goes as follows:
Code: [Select]
//01001101 -- XCLR/CS high, keep VREG and PullUps
if( BB_simpleCMD(fd, 0x4D, 1, "1") ) {
return -1;
}
... //other I2C commands
//01001100 -- XCLR/CS low, keep VREG, PullUps
if( BB_simpleCMD(fd, 0x4C, 1, "1") ) {
return -1;
}