Skip to main content

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

61
Project development, ideas, and suggestions / Re: Indoor cat locator
I started the project from forcing my cat to wear a collar. It doesn't like it and desperately tries to tear it off ( well, it's a she but I keep referring to it simply as a cat ) .. I hope that given some time it won't be able to live without its collar :) I will post some IR experiments results soon.
62
Bus Pirate Support / Re: Controlling CS pin in binary I2C mode
I have added a new I2C binary mode command which I called extended AUX. It uses the AUXpin.c functions with an extra parameter not to print anything. Now it works just like it did in the text mode. The command is 0x09 ( 00001001 ) and takes one byte parameter not to waste any more bytes in the root command set. I tried not to define any more variables but to reuse existing. I am not sure this is the best way to go, but I don't know how much RAM we have.

Below is the command itself and all possible parameters for now:
Code: [Select]
//00001001 xxxxxxxx
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;
I 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.

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
I have looked through the BP source and I think I found the difference. In text mode I am setting it to use alternative Aux ( CS ) and then controlling it with a/A which calls the following routine in the BP source:
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
}
#endif
As 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 only
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
}
Now 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.
65
Client software / Re: Icon for Logic Sniffer Client on Mac OSX
Alright :) I will modify the dmg bundle creation script and push it into my fork. I will also use a different icon for the DMG itself so it is clear which one is a package and which is the application.

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 ? )
68
Client software / Re: Client beta testers
I would also opt for sticking to this forum. Maybe there could be a hidden sub forum if that would help in any way.
71
Client software / Re: Client beta testers
I can test MacOS builds.. I am already syncing Jawi's client daily with his GIT repository. If there is a need I can also test it in virtualized (VMWare fusion) XP environment.
73
Bus Pirate Support / Re: Controlling CS pin in binary I2C mode
Attached binary log, it's quite long as it includes entering binary mode. I have connected a multimeter to the CS pin and in binary mode it gives 3.25V while in text mode it is 3.29V. Now that's just weird.. while the multimeter was still connected I could randomly get readouts in binary mode. As soon as I unplugged it it kept giving NACK to A/D which means the XCLR is LOW.

[attachment=0]
74
Bus Pirate Support / Re: Controlling CS pin in binary I2C mode
A dump from the binary mode or text commands used to achieve this ?

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
Hi Ian,

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;
}

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01642447272session_write_close ( )...(null):0
20.01672578888ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01672579664Database_MySQL->query( ).../DatabaseHandler.php:119
40.06052718424Database_MySQL->error( ).../Db-mysql.class.php:273