Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - arakis

1
Bus Pirate Development / NRF24 module mode...
It seems it will be relativly easy to implement NRF24 module mode..

using the ADC pin as the interrupt, and the aux pin for the TX/RS strart up, (CE pin of the module)
it uses simple SPI protocol, with few commands etc...we could even make a cable for it.. or a addapter pcb...

did some register read/writes, without any problems using the SPI connections..

here is the terminal
Code: [Select]
m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)

(1)>5
Set speed:
 1. 30KHz
 2. 125KHz
 3. 250KHz
 4. 1MHz

(1)>4
Clock polarity:
 1. Idle low *default
 2. Idle high

(1)>1
Output clock edge:
 1. Idle to active
 2. Active to idle *default

(2)>2
Input sample phase:
 1. Middle *default
 2. End

(1)>1
CS:
 1. CS
 2. /CS *default

(2)>2
Select output type:
 1. Open drain (H=Hi-Z, L=GND)
 2. Normal (H=3.3V, L=GND)

(1)>2
Ready
SPI>W
POWER SUPPLIES ON
SPI>[0
/CS ENABLED
WRITE: 0x00
SPI>r
READ: 0x08
SPI>r
READ: 0x08
SPI>r]
READ: 0x08
/CS DISABLED
SPI>[0rr]
/CS ENABLED
WRITE: 0x00
READ: 0x08
READ: 0x08
/CS DISABLED
SPI>[1r]
/CS ENABLED
WRITE: 0x01
READ: 0x3F
/CS DISABLED
SPI>[2r]
/CS ENABLED
WRITE: 0x02
READ: 0x03
/CS DISABLED
SPI>[3r]
/CS ENABLED
WRITE: 0x03
READ: 0x03
/CS DISABLED
SPI>[4r]
/CS ENABLED
WRITE: 0x04
READ: 0x03
/CS DISABLED
SPI>[5r]
/CS ENABLED
WRITE: 0x05
READ: 0x02
/CS DISABLED
SPI>[5r]
/CS ENABLED
WRITE: 0x05
READ: 0x02
/CS DISABLED
SPI>[0x25 100]
/CS ENABLED
WRITE: 0x25
WRITE: 0x64
/CS DISABLED
SPI>[5r]
/CS ENABLED
WRITE: 0x05
READ: 0x64
/CS DISABLED
2
General discussion / Li Ion charger capable of charging incorrectl placed batts
HI I got this cheap universal chareger for a phone that had it's USB jack snapped off and taken the traces with it.. so no cable charging is posible..
http://www.chinabuye.com/3g-usb-portabl ... ry-charger

It's an interesting little device. You set the location and pitch of the little spring loaded pins, and you connect up any Li Ion battery.. and it gets charged... Now the interesting part is that the charger will safly charge batteries no matter how you connected the + and - pins... you can connect + to the left one and the - to the right one, or the other way around and it will work without issues... No third pin means no thermal monitoring, but from what I figured out it charges at only ~300mA, and from the charging tests I made, the batteries bearly got heated at all, far less then when charged through my phone..

I was intrigued so I opened the little thing up to see how it works..

It has the classic simplest and cheapest flyback (optocoupler + zener) controlled 5V regulator.... nothing worth mentioning there.. But the battery is connected to a DIP 8 IC with markings mt1151D.

with pin 1 connected to one of the batttery prongs, and a bypass cap. pin 2 is NC, pin 3 connects to a charging LED.. forgot where pin 4 is connected (probably GND). pin 5 and 6 are GND, pin 7 is connected to the second battery prong, also bypassed to GND, and pin 8 is connected to VCC...

Offcourse searching for this IC online has proven to be impossible, does anyone know of a similar charging chip that can do this as well..
3
Bus Pirate Support / Bus Pirate Firmware 6.3 BETA development
We've kicked BP development in high gear! For the last few days we've been clearing out the backlog of Issues, and I guess this is a good time as any to move to version 6.3 beta... as of SVN rev 2088... Find attached the hex files for BP version's 3 and 4.., or compile from the latest source code in the SVN..

Here's the link to the tracker http://dangerousprototypes.com/track/

Any feedback would be greatly appreciated.

I'll use this post to add links to the latest issue fixes as they come...

Issues fixed in 6.3

Issue #66

In baseIO.c the function bpWlongdecf() fails to correctly print out some values when the mld or mil bits are set.
e.g.: 1.1million as 1,0100,000.

Issue #73

The other problem appeared to be a resolution issue. As an example, while measuring a 2Hz frequency, the measurement was often 1Hz. So I decided to take a stab at improving frequency measurements. I decided to use the prescaler only when necessary. I also decided to measure the period and divide for low frequencies.

Isssue #65

Bus Pirate V4 AUX1 and AUX2 fail to return to input/hi-z state.
A patch file is attached while corrects the problem.

Isssue #63

Add onboard pullup resistor command to binary mode

Isssue #50

New display change during reads added, comand rd reads digital, rx reads hex and rb reads binary

Isssue #51

BP4: During I2C interaction in terminal '}' stop bit command always returns "ERROR: command has no effect here"

Isssue #24

UART TX pin read as input during 'v' command

Isssue #57

Clutch pedal added to all protocols. output pins are now only connected once the turn on power supplies 'W' command is issued. they are disconnected again if 'w' command is issued (power off)... multiple repeatitive engage/disengage are posible...
4
Project logs / Smoke Tester
[attachment=1]

Here is the Smoke Tester (wiki). It's a board designed to safely power you prototypes, and check if they have a short somewhere. Also included is a current measuring feature on which output the current could be read using a voltmeter. Here's the full feature list.

    5V and 3.3v voltage regulators
    7V-15V input
    3 possible input sources: USB, 2mm DC barrel jack, and screw terminals
    3 possible outputs: USB, Banana Jacks, and screw terminals
    Polyfuzes with fuse blown LED indicators on both rails
    Current to voltage converters - aloes you to read the current simply with a voltmeter
    Jumpers to bypass the current measurement shunts
    Jumper to bypass the 5V voltage regulator, allowing you to power the 5V output rail directly from the USB input

Design files are available in our SVN.

This design was though up as something we'd like to use in the workshop, but if enough people like it, it might go into production as well. We were inspired by Schazamp's "USB Power Supply with Resettable PTC", we strongly suggest you check it out.

Prototype boards will go out soon with any updates. If you have any suggestions please leave a comment below, or check out the forum thread about it.
5
Project development, ideas, and suggestions / [fixed CODE added]PIC16F182x as I2C slave bulk read problems
I've been working on the Bus Pirate Demo Board v5...it features a PIC16f that emulates varius different ICs such as I2C EEProms, ADCsm DAC etc...

and I'm stuck on the I2C EEPROM :( Ii emmulates 24LC type single byte adressed EEPROMS (so 256 bytes of space)
I got it to work fine for single and bulk writes...while the Read operations only work in singles...bulk read always returns giberish for all the data flowing the first byte...

Does anyone have a working example of a I2C slave configured PIC that supports bulk reads....(using HW MSSP module)..
Here's the code...
Code: [Select]
void initI2C(void)
{

    // init I2C slave, 7bit address, 100KHz
   
SSP2BUF=0x00;          // clear buffer
    SSP2STAT=0x80;          // 100KHZ
    SSP2MSK=I2CADDMASK;    // and mask; this will allow multiple instances
    SSP2CON1=0x36;          // SSP1EN|!clockstretching|7bit mode /w int
    SSP2CON3|=0b11000000;
}


// main loop + statemachine
// EEPROM
void I2CEEworker(void)
{ unsigned char token, addr, temp, addressed,ff;

addr=0x00;
addressed=0;


    SSP2ADD=I2CADDEE; // Set slave addres
SSP2CON1bits.SSPEN=1;
    while(1)
    {
        //i2c state machine
        if(SSP2IF)
        {
token=SSP2STAT&I2CSTATMASK;

            if(SSP2STATbits.S) // start condition

            {
LED1ON;

switch(token)
                {
                    case MWA:              // master write address
                        temp=SSP2BUF; // temp holds I2Caddress
                        break;
                    case MWD:              // master write data
                        if(!addressed)
{
addr=SSP2BUF;
addressed=1;
}
else
{
eeBuf[addr++]=SSP2BUF;
}
                        break;
                    case MRA:              // master read addres
                        temp=SSP2BUF;
I2CWrite(eeBuf[addr]);
break;
                    case MRD:              // master read data
                        if(!addressed)
{
temp=SSP2BUF;
I2CWrite(eeBuf[addr++]);
addressed =1;
}
else
{
I2CWrite(eeBuf[addr++]);
}
                        break;
                }
            }
            else if(SSP2STATbits.P) // STOP condition
            { LED1OFF;
addressed=0;
                asm("NOP");
            }
            SSP2IF=0;
            //SSP2CON1bits.SSPEN=1;
            /*if(token!=MRD)*/SSP2CON1bits.CKP=1; //release SCL line
        }
    }
}


// outputs a byte on the bus and releases the clk line
void I2CWrite(unsigned char c)
{
    do
    {
        SSP2CON1bits.WCOL=0;
        SSP2BUF=c;
    } while(SSP2CON1bits.WCOL);
    SSP2CON1bits.CKP=1; // release SCL line
}

6
Project development, ideas, and suggestions / BP Demo board v5 firmware development
Hi, I'm continuing Sjaaks work on the demo board v5 firmware, I made this topic so you could add suggestions, and help me out a little :)
Sjaak, could you tell me what's that status last time you looked at it, any bugs you remember, etc...What need to be done for completion..etc..

if you could write a short (hopefully) description of the code..it would help me a lot, thanks
Also, any suggestions on what should be addressed first etc are welcome...
7
Sick of Beige / Yet another alternate design
Here is a little design I made based on eariler designs, and arhi's commetns
[attachment=1]
It features 2 sheets as now, with two additional ring sheets.. that serve as standoffs and side protection at the same time...
[attachment=0]
only bolts and nuts need to bee used, like this combo for example
with the holes on the bottom layer slightly larger to accommodate these kinds of nuts....also the design is much tighter..

I really like the black lower layers with he top transparent. the Black/RED(board) contrast looks cool, at least in SU it does...
this could possibly be cheaper to do then 8x bolts, 8x standoffs...

the standoffs ring are 2.55mm in high, most of our board components should fit, but for higher components, either cutouts on the top could be made, or another Ring could be added...
8
Project development, ideas, and suggestions / HD44780 LCD USB Java, (later BT and android)debuger...
<rant><RANT>I just got an Android 2.3 phone, and a day later, I started my first app for it :D...it's still in the very early stages, but I intend to make a game I used to play with my classmates in high-school, it's 4 in a row but with more then 2 players...we used to play in 4 or 6 people....but nvm the app will use BT....this got me thinking what cool project I could make with BT. This BT idea will be at the bottom of this post, first is the USB example of the same thing</RANT>

If you skipped the rant above, as any same person would, here is the idea. Additional, or supplemental firmware for the LCD Backpack...called LCD debugger. Instead of driving a LCD, another board drives it as a LCD, and the LCD info is displayed over the USB on a Processing (or Java) App...

The app looks like a 44780 LCD and the system LCD Backpack -> Processing app act exactly as a LCD would....
The coding for this should be relatively simple. the LCD backpack, receives commands recognizes them and passes them on to the processing app which displays them.

The second thing I wanted to build is a LCD Backpack, but instead of USB, it runs over Bluetooth....same thing as the USB...it should be able to display and debug 44780 LCD over a Bluetooth connection and a Android app...So instead of fixed screen LCD you have a portable app......

(on another note, this could be implemented by making a Bluetooth module -> USB host board, that would act as host to the LCD Backpack</rant>
9
Project development, ideas, and suggestions / TETRIS protoboard
While writing the PICtris post, an idea hit me for cool prototyping areas. I really hate the single pin ones. Rows of pinholes going from one end to the other are an improvement, but not by much... anyway here's my idea..

5 blocks connected between each other with cut-away traces...in the sign +....

in this config you can get 4 pinholes in-line each connected to a different 5block group, also available is a square of 4 pinholes with each one connected to a different group as well
10
General discussion / PCB video review Tuesday
We're starting a new weekly feature called PCB video review Tuesday. We'll take a look at a few boards and talk about what we would change before production.

There's lots of styles of PCB routing, and our's isn't the right one or the best, but we want to start a dialog to help everyone make better PCBs.

To get your PCBs reviewed please post the Eagle source files here
11
Project development, ideas, and suggestions / DP Part Ninja
Well since the free PCBs started arriving, I think its a good time to start a separate thread for the Part Ninja.

Part Ninja V1 is a electronic component testing tool. It identifies electronic components like transistors and FETs, determines the pinout, and measures basic specifications. Several SMD footprints are included so surface mount parts can be tested too.

Only a few pins and resistors are needed for the transistor tester, so we used the extra PIC hardware to add extra features. A voltage reference along with the PIC’s comparators should help us measure capacitors somewhat accurately. In many designs there are dead spots where resistor measurements are not accurate – we added an extra resistor ladder with a wide range of values to compensate.

    *Determines pinouts and key values for transistors, resistors, capacitors, diodes and more
    *PCB that is the same width of a 2×16 44780 character display
    *Has a small area where SMD components (SOT23, 1206, 0805, 0603, 0402) can be tested
    *PWM generation on two pins for advanced testing
    *Comparators on two pins for advanced capacitor measurement

This is just our first development prototype to get familiar with how semiconductor testers work. This design borrows heavily from other DIY testers, such as the AVR Transistor Tester. We hope to develop it further into a simple-to-use semiconductor tester and LCR meter, then release it as a project at Seeed.
12
Project logs / PIC32 PTH breakout development
[attachment=0]
I received one of the PIC32DIP breakout boards and a PIC32MX220F03B to go with it :D

Now I am a total beginner when it comes to USB so this was my head first dive into it. Since the design for the board called for all Through hole components and some constrains dimensional. (the with of the broken out pins was set at 700mils, thus leaving lots of room on both sides of a standard bread board for wire connections.

Now because of this witch constraint the crystal couldn't be placed as close to the pins as I would have liked. So the first thing I wanted to test on the board was the USB and see if it woks as intended.

To get the most stable result I used a 8Mhz primary harmonic crystal (higher frequency crystals tend to use higher harmonics, and are more prone to noise)

So the first thing I did was try to use the CDC Basic Demo (demo in future use) found in MAL. Easy right.
Wrong. it is only setup for MX4xxx and MX7xxx series of PIC32s. and theses MX1/2xxx use some different configurations.
By just changing the uC used in the demo project resulted in lots of warnings.

So the only thing left was to port it to my uC. I made a new project, and started copying the code that was intended for the 32MX460.chips, and disregarded the rest.

*looking through the code you will stumble onto things like #id defined (__32MX_460***) etc. copied those, spiked all else. Also I spiked including the hardwareprofile.h but copied only the relevant stuff into main.c Skiping all functions that were related to board specific stuff, like LEDs and Swithches.

once I did that, and setup my Configs, the #pragma stuff for my crystal, and lots of browsing to include the relevant header files from MAL into my main.c and usb cdc related .c files. (basically just hitting build and finding the include error and fixing the link)
once all the include errors were fixed the project build successfully. I quickly took my pickit3 and programed the board. stuck the usb jack in and crossed my fingers. And I as greeted with Windows 7 message Unknown device, error 43.

This was annoying as hell since I had no clue what the error could be, as I don't know anything about USB.So I started a thread in Microchips pic32 forum and got a response in 24hs (thanks Hidab).

I used the suggested added configs and added the code to my main.c which he suggested. The one thing that surprised me was that in order for the CDC to work properly USB_POLLING must be defined in usb_config.h instead of USB_INTERRUPT.

Once this was built, and programed, I was warmly surprised by windows finding CDC-RS232 :D:D:D
Below are the configs needed to get it to work with a 8mhz Cristal with the CPU running at 40MHZ

Code: [Select]
        #pragma config UPLLEN    = ON        // USB PLL Enabled
        #pragma config FPLLMUL  = MUL_20        // PLL Multiplier
        #pragma config UPLLIDIV  = DIV_2        // USB PLL Input Divider
        #pragma config FPLLIDIV  = DIV_2        // PLL Input Divider
        #pragma config FPLLODIV  = DIV_2        // PLL Output Divider
        #pragma config FPBDIV    = DIV_1        // Peripheral Clock divisor
        #pragma config FWDTEN    = OFF          // Watchdog Timer
        #pragma config WDTPS    = PS1          // Watchdog Timer Postscale
        #pragma config FCKSM    = CSDCMD        // Clock Switching & Fail Safe Clock Monitor
        #pragma config OSCIOFNC  = OFF          // CLKO Enable
        #pragma config POSCMOD  = HS            // Primary Oscillator
        #pragma config IESO      = OFF          // Internal/External Switch-over
        #pragma config FSOSCEN  = OFF          // Secondary Oscillator Enable (KLO was off)
        #pragma config FNOSC    = PRIPLL        // Oscillator Selection
        #pragma config CP        = OFF          // Code Protect
        #pragma config BWP      = OFF          // Boot Flash Write Protect
        #pragma config PWP      = OFF          // Program Flash Write Protect
        #pragma config ICESEL    = ICS_PGx1      // ICE/ICD Comm Channel Select
        #pragma config DEBUG    = OFF            // Background Debugger Enable
        #pragma config JTAGEN    = OFF            // JTAG Disabled
        #pragma config FUSBIDIO  = OFF
        #pragma config FVBUSONIO = OFF
        #pragma config PMDL1WAY  = OFF
        #pragma config IOL1WAY  = OFF

The following had to be added to the start of the main function, one of things is that the 32mx1/2 series uses ANSEL instead of the AD1PCFG the other 32mxs use

Code: [Select]
    #define CLOCK_FREQ 40000000
    SYSTEMConfig(CLOCK_FREQ, SYS_CFG_WAIT_STATES |  SYS_CFG_PCACHE);
    mJTAGPortEnable(DEBUG_JTAGPORT_OFF);
    INTEnableSystemMultiVectoredInt();
    ANSELA = 0x0000;
    ANSELB = 0x0000;

I'll add the whole project and hex file shortly.
13
Sick of Beige / another version of the SOB laser case
I was thinking about our case with he side panels, and I realized I really dint like the side panels that much. As sides they are ok, but front and back panels somehow dont fit very well for me.

so here is another possibility we could do.
advantiges:
*PCB closer to cases edge at back and front.
*better access as a result of the above

disadvantages,
4 more bolts and nuts will be required.
14
Sick of Beige / SOB Case Design Contest
It would be a cool idea to have a case design contest once we announce our standard PCB sizes. As incentive we could etch Designed by:***** on the winning case design, and so free Elcetronics stuff..

proposition of design criteria.
*Laser/Acrylic
*ease of fabrication
15
General discussion / Cheap PCB manufacturing timelines
Hi I am interested to know your experiences on the time it takes to make your boards, and ship them to you.
I am mainly interested in DorkBotPBX, and spark funs BatchPCB, but any experience is welcome. Thanks.