[quote author="ian"] I can give you some example of setting/clearing bits in a byte if that's the hangup. [/quote]
Thanks ian, but binary arith is not the problem for an asm veteran :p
Forgot about adding commands. I solved the problem differently. Actually the main pb was that I'm controlling BP using a DLL, and I don't master at what time this DLL could be re-initialized, and what time it could be reloaded, or unloaded.
The solution now is: 1- Either force the BP state at any time at a specific bit pattern 2- Force the software developper to call my callback routines (in my dll) at specific times (at loading/unloading the dll) to let me master the life cycle of my global vars in my DLL.
This was the main pb and I suceeded at having the second option done correctly (few minutes ago, the calling software has been corrected hopefully).
For some reasons it's not always easy to track pins changes, especially in certain situations when pin state changes frequently from IN to OUT and vice-versa. it's not also possible to reset the BP each time because of that. So having to send only the state of the concerned pin is a better solution.
Thanks ian, but three weeks is too much for me. I hoped that you (or anyone on the forum) has some of them ready to sell one to me. What I'm trying to achieve will be ready before the end of this week I hope.
@ rsdio and @tayken [quote author="rsdio"] Can't you just buy something like the PICkit 2 from Microchip? [/quote]
I have got an ICD2, a PICKit2, PicStart, numerous Jtags, dev boards with onboard programmers for PIC, PIC24/dsPIC, PIC32, 8051, AVR, ... with some additionnal multipurpose programmers .... this is not THE PROBLEM
I'm working on a nice thing (if it works) for BusPirate PicProgrammer, and I need the adapter board for tests. That's all. I can mount at home a level adapter and switching voltage stuff (using an ULNxxxx or trans) , but I really don't have too much time to spend on it, I wanted to spend more time on the firmware/software part than on hardware.
This means that if I want to be able to toggle each pin separately, I need to maitain somewhere (in a global var) the last state of the output pins (pins set as output). this way I can re-send the last state for the output pins I dont need/want to change.
maybe a better solution is to change the firmware and add a function that let users toogle only ONE output pin alone. what do you think ?
Hello, I'm working on some code for buspirate in binary raw mode (http://dangerousprototypes.com/docs/Bitbang) . I have checked the BP documentation, and I wanted to ask for a confirmation.
is there any way to toggle only one pin?
the only command I can find on the wiki is :
Quote
1xxxxxxx - Set on (1) or off (0): POWER|PULLUP|AUX|MOSI|CLK|MISO|CS The lower 7bits of the command byte control the Bus Pirate pins and peripherals. Bitbang works like a player piano or bitmap. The Bus Pirate pins map to the bits in the command byte as follows: 1|POWER|PULLUP|AUX|MOSI|CLK|MISO|CS The Bus pirate responds to each update with a byte in the same format that shows the current state of the pins.
Does this mean that there is no way to toggle only one pin alone?
What will happen if I want to toggle only MOSI for example ? if I put all other pins mask to ZERO, will that put all those set as OUTPUT to low state?
Glad it worked for you tayken. I know this kind of problems mainly because I started working with Linux since 1995 ... I was using Slackware Linux, and we had a lot of problems with terminal emulation and its config. The time being, Slackware install software on PC was in text mode, and there were no native PC key handling for most extended keyboards (at least for those we had with our PC AT 486XT ) , so we had to deal with such problems using Ctrl+H and other techniques ...
[quote author="tayken"] Doesn't backspace clear the values from the buffer? [/quote]
Answer is "NO, NOT ALWAYS" !!!
All depends on the terminal emulation you are using in your PC side software. What software are you using? what emulation are you using (none, VT100, ...) ?
I don't know the Zmachine Adv Emul, but if you dont need PPS, you may also check the latests PIC32. They have up to 128KB of ram and builtin Ethernet and USB