Quantcast
Channel: Objective Development Forums
Viewing all 4524 articles
Browse latest View live

Re: Does usbPoll() get executed before entry to the ISR?

$
0
0
cpldcpu wrote:Can the Attiny 85 do 12 MHz at 3.3V? I am certain this is out of spec.

This is Yoshiyasu Takefuji's project, published in Circuit Cellar in issue no.213, year 2008, using Christian's driver. He arrived at the point (12MHz, 3.3V) by interpolation, I think. Anyway, I would like to draw attention towards the timing matter that I mentioned.
If you clear pending interrupts before the SEI there may be. Otherwise the is most likely an interrupt pending and the ISR is called. You should mention what you are doing before the SEI.

The device has just been plugged into the host port. What I do before the sei() is exactly depicted in the code block of post #1, which is ALL of the main function. I think you know what usbInit() does, do you?

Re: Several security dialogs every reboot on Mavericks

$
0
0
I tried a reinstall, yet I still get these log messages.

Wheres the download of the English version?

$
0
0
The download from GitHub doesn't seem to have anything other than examples.

Where can you download the std version of WebYep and also documentation?

Re: Why did Launchbar stop finding applications?

$
0
0
Very pleased this solved my problem too! Thanks!

Re: LB doesn't use 'Natural' scrolling

$
0
0
Please fix this (respect the system pref option for scrolling direction), it shouldn't be a biggie.

Re: static uchar usbIsReset; /* = 0; USB bus is in reset p

$
0
0
blargg wrote:I couldn't find that variable in several of the 2008 versions. From the comment, it looks more like it's just trying to emphasize that static objects in C are initialized to 0 if no initializer is present. In other versions there's a local static for calling a user-defined reset handler only once, and the variable is used to keep track of whether it's been called, so maybe this is for that purpose.


Thanks blargg. Let's change usbIsReset by another variable: usbDeviceId, which may be present in newer versions. This variable is so declared in usbdrv.c:
volatile char      usbDeviceId;

And my question is now another one: this variable needs to be zero when control first enters the external interrupt service routine, but it is set to zero nowhere in either usbdrv.c or usbdrvasm.S. It is no other thing than the device address, which must be zero when starting enumeration. How can the declaration above make the variable initial value zero? In C, all uninitialized global variables are zero when the program is loaded (from disk). But here, after turning on power, the RAM is in an aleatory state!

The sources I am using are not among the versions listed in this site. I am, however, giving you a link, http://www.filedropper.com/takefuji-213, coded in 2004 by Christian Starkjohann, except the app, da.c, which by its very simplicity is easy to analyze, in case you care to skim it.

Instructions to Get ESO Gold through PVP

$
0
0
The Elder Scrolls Online amusement is a standout amongst the most foreseen amusements approaching for the 2014 year. Numerous individuals need that this will rapidly turn into a standout amongst the most mainstream MMO amusements once it is discharged. Gathering ESO gold will viably be the money utilized by characters as a part of the amusement. This could be utilized to buy various distinctive weapons and overhaul your reinforcement. In the event that you haven't discovered the right framework yet, you may need to know how you will procure gold all around the diversion. You can discover some by simply playing through the diversion and joining in on missions. Anyhow one of the most ideal ways may be to essentially utilize the new PVP work that has been incorporated.

Some individuals are thinking about how PVP will turn out in the diversion. There have been just a couple of items discharged through the ESO engineers about the PVP framework. Not surprisingly, you will have the capacity to fight different players in an one on one style setting. You might in all likelihood be ready to acquire gold by partaking in these combats. Assuming that you have the capacity to annihilation the other player, you will be compensated with a certain measure of gold coin. This could make it worth your while to seek after this choice.

Since the PVP framework in ESO is still a bit crude, some aren't certain what amount gold will be paid out through a triumph. Anyway numerous foresee that it will be well worth your exertion to test your player's aptitudes against an alternate. There will successfully be a competition framework set up, which will sway players to seek command over a domain. This would likely likewise help players quickly collect TESO gold coin, in the event that they are fruitful throughout PVP combats. It may be a standout amongst the most effective methods for getting the money that you require.

If players need to buy the elder scorlls online gold, can visit www.esosell.com, the site will provide cheap teso gold for players!

SWTOR daily Event Guide for SWTOR Credits

$
0
0
Life Day Event is presented as a piece of SWTOR Second Anniversary festival, which endures between December seventeenth, 2013 and January first, 2014 (starts and closures at 2am PST/ 10am GMT). Throughout this period, look at your post box free of charge prizes like YR-O2scout Galactic Fighter paint occupation and Second Anniversary Fireworks (box that holds 25 firecrackers). On top of these prizes, new merchant might be found in Galactic Trade Market region, where you can purchase the accompanying 4 things:

Cyan Sphere Speeder (requires 16 Grey Helix Components and 36 Snow-Covered Parcel)
Fireworks: Life Day Tree (requires 500 credits)
Life Day Snowball Bomb (requires 1 000 credtis)
Sleight I Speeder (requires 24 Snow-Covered Parcel)
Life Day Event

In the wake of tossing a Life Day Snowball on your target, you have a little risk of securing a Snow-Covered Parcel, as a piece of fruitful "A Special Snowflake" mission fulfillment. Accomplishments tide to this occasion could be finished through social event Snow-Covered Parcels.

In the wake of gathering a Snow-Covered Parcel you'll gain accomplishment "Jolly Parcel Peddler", for 25 Snow-Covered Parcels accomplishment "Merry Life Day To All!", for 100 Snow-Covered Parcel accomplishment "To All A Good Night!" and legacy tittle: "A Special Snowflake". Each of these three accomplishments rewards you with one accomplishment focus.

Buy SWTOR credits or need more SWTOR information, visit http://www.swtorcreditsonline.com for answers!

Why Do You Want to Buy Elder Scrolls Online Gold

$
0
0
In every gaming knowledge, particularly web amusements, amusement money like gold is a greatly imperative some piece of the diversion. In most diversions, players utilize their gold as a part of various approaches to make the amusement less demanding. They could utilize it to purchase new apparatus and weapons off the sale house. They can utilize it to assist further their creating callings, and they can utilize it to help redesign and upgrade their present apparatus. There are hopefully numerous things that gold is utilized for as an amusement money, that it is basic for genuine players to make sure to have a sufficient supply for their necessities.

In this viewpoint, Elder Scrolls Online is no diverse. The issue with gold in amusements is the way that hinging upon the server or amusement, it might be hard and focused to get the measure of gold required to verifiability have an effect in a player's gaming background. In Elder Scrolls Online, there are a couple of distinctive systems to really purchase gold for the diversion, and for those players that can bear the cost of it, this might be to a great degree advantageous for their gaming knowledge.

By purchasing the gold straightforwardly, players will have the capacity to make the vital redesigns to their rigging and level their creating callings a great deal speedier. In the long run, somewhat monetary speculation into purchasing gold will at last permit players to get the upper hand at securing their in diversion money related status so they can level quicker and begin cultivating more gold less demanding on their own.

In this manner in the long run, purchasing gold in the Elder Scrolls Online diversion can't hurt the players gaming knowledge, it can just increase it. So when you need a jolt on the diversion, purchasing Elder Scrolls online gold could be advantageous and couldn't harm your amusement play.

HIDKeys: usage of PD1

$
0
0
Hi all.

The HIDKeys sample application provides for 17 keys.
The pin assignments include "PD1 debug tx".
The circuit diagram shows PD1 disconnected and yet a portion of the "hardwareInit" function states...
   
DDRD = 0x07;    /* 0000 0111 bin: all pins input except USB (-> USB reset) */
   j = 0;
   while(--j){     /* USB Reset by device only required on Watchdog Reset */
      i = 0;
      while(--i); /* delay >10ms for USB reset */
   }
    DDRD = 0x02;    /* 0000 0010 bin: remove USB reset condition */


What is the reason for this assignment and treatment of PD1?

Could PD1 be used to expand the 17 keys to 18 keys instead?

Many thanks,

Ross

No Install!

$
0
0
Totally lost my HDD (1TB Seag on a 2012 27"iMac). Replaced the HDD and added a 250G Samsung SSD Didn't have a complete backup so it's basically a complete new machine.
For some reason Little Snitch 3.3, one of the very first appsI install, will not install. It goes thru the motions up to the actual installing of files and then tells me "installation failed, see log"
The log tells me this: (which I'm afraid means zero to me)
======================================================
INFO: Ignoring path for bundle at.obdev.LittleSnitchConfiguration: /Volumes/seag-3tb/DOWNLOADS/-NEW/trans/Little Snitch Configuration.app
INFO: Installation mode: Fresh Install
INFO: *** Stopping Services
INFO: *** Removing Components
INFO: *** Stopping Services
INFO: *** Removing Components
INFO: *** Copying Components
INFO: Checking directory exists: /Library/LaunchDaemons
INFO: Fixing permissions for directory /Library/LaunchDaemons
ERROR: Error fixing permissions for /Library/LaunchDaemons:
INFO: Checking directory exists: /Applications
INFO: Fixing permissions for directory /Applications
ERROR: Error fixing permissions for /Applications:
INFO: Checking directory exists: /Library/LaunchAgents
INFO: Fixing permissions for directory /Library/LaunchAgents
ERROR: Error fixing permissions for /Library/LaunchAgents:
INFO: Checking directory exists: /Library/Application Support
INFO: Fixing permissions for directory /Library/Application Support
ERROR: Error fixing permissions for /Library/Application Support:
INFO: Checking directory exists: /Library/Little Snitch
INFO: Creating directory /Library/Little Snitch
ERROR: Error creating directory /Library/Little Snitch:
INFO: Checking directory exists: /Library/Application Support/Objective Development
INFO: Creating directory /Library/Application Support/Objective Development
ERROR: Error creating directory /Library/Application Support/Objective Development:
INFO: Checking directory exists: /Library/Application Support/Objective Development/Little Snitch
INFO: Creating directory /Library/Application Support/Objective Development/Little Snitch
ERROR: Error creating directory /Library/Application Support/Objective Development/Little Snitch:
INFO: Installing LittleSnitch.kext (4052) in /Library/Extensions/
ERROR: Error installing LittleSnitch.kext:
INFO: Installing Little Snitch Daemon.bundle (4052) in /Library/Little Snitch/
ERROR: Error installing Little Snitch Daemon.bundle:
INFO: Installing Little Snitch Uninstaller.app (4052) in /Library/Little Snitch/
ERROR: Error installing Little Snitch Uninstaller.app:
INFO: Installing Little Snitch Network Monitor.app (4052) in /Library/Little Snitch/
ERROR: Error installing Little Snitch Network Monitor.app:
INFO: Installing Little Snitch Software Update.app (4052) in /Library/Little Snitch/
ERROR: Error installing Little Snitch Software Update.app:
INFO: Installing Little Snitch Agent.app (4052) in /Library/Little Snitch/
ERROR: Error installing Little Snitch Agent.app:
INFO: Installing launchd configuration /Library/LaunchDaemons/at.obdev.littlesnitchd.plist
ERROR: Executable for bundle /Library/Little Snitch/Little Snitch Daemon.bundle not found
ERROR: Error writing plist:
INFO: Installing launchd configuration /Library/LaunchAgents/at.obdev.LittleSnitchUIAgent.plist
ERROR: Executable for bundle /Library/Little Snitch/Little Snitch Agent.app not found
ERROR: Error writing plist:
INFO: Installing Little Snitch Configuration.app (4052) in /Applications/
ERROR: Error installing Little Snitch Configuration.app:
ERROR: Error writing plist:
INFO: This is a major new install. Configuring appropriately.
ERROR: Error setting new install mode:
INFO: Updating caches...
ERROR: Pre-linking the kernel failed!
ERROR: kextcache returned status -1.
ERROR: For more details, run the following command in a Terminal window:
ERROR: sudo kextcache -v 6 -update-volume /
================================================================
Can anyone help?
I'm kinda stuck without it,
Thanks in advance

Translate a lot of text using Google Translate in Safari.

$
0
0
Hi all!

Some time ago I noticed that I couldn't translate big chunks of text using a LaunchBar search template because of a limit in length of the URL.
So I made this AppleScript that writes the input text in the source textarea of Google Translate. This way this script can handle text of arbitrary length! :D

You can find and fork the script here: https://gist.github.com/crmne/8478027

Enjoy!

Re: Data Rate in bps

$
0
0
I came here to ask for data rate in bps too.

Ideally something akin to the dynamically changing network consumption displayed in iStat Menus. It shows bps until it hits mbps and then switches to mbs and vice versa. I've kept iStat around just for this feature in my menubar.

I'd like to just use the network consumption in LS, but kBs doesn't easily translate to meaningful info for me.

But simply bps or mbs alone would be a welcome improvement!

Convert Currency using Google Finance

$
0
0
Hi all!

Since iGoogle has been closed, this script wasn't working anymore. So today I set out to make another AppleScript.

It accepts input in this form: `<amount> <from currency> […] <to currency>`. So for example all of those strings will result in the same conversion: "60 gbp to eur" "60 gbp in eur" "60 gbp eur". It will then display a large type message and set the next LaunchBar selection to the result.

You can find it and fork it here: https://gist.github.com/crmne/8481724

Enjoy!

Re: static uchar usbIsReset; /* = 0; USB bus is in reset p

$
0
0
The why:
For a program running from the ROM of a microcontroller there likely is no loader, and the task of zeroing BSS would fall to the program's runtime startup routine (crt0 in the old days). According to the avr-libc manual, you have the option of placing uninitialized variables in the .bss section (which should be all zero) or the .noinit section, which is a .bss subset that does not get zeroed on startup.

This quotation is from linuxquestions.org. I did not use that option. Do
 avr-gcc -I. -c -S -mmcu=<avr device> usbdrv.c
. It outputs usbdrv.o and usbdrv.s. The latter is an assembler source, the C source file translated into assembler. Looking into it, you'll see
 
.global __do_copy_data
.global __do_clear_bss

The global variable under discussion is declared in usbdrv.c:
volatile char      usbDeviceId;

This variable is used, but not declared, in usbdrvasm.S. But gcc (or avr-gcc, it's the same) considers all undeclared variables in an assembler source as externals. So, in usbdrv.s, it looks like this:
       .comm   usbDeviceId,1,1

Now, if common variables are taken as globals by gcc, we have that usbDeviceId debuts as zero in the executable! The code to clear the .bss section CANNOT be seen in the assembler sources generated by gcc. It lies in some library and put ahead of the programmer's code by the linker. What do you know?

Re: static uchar usbIsReset; /* = 0; USB bus is in reset p

$
0
0
The AVR-LIBC erases the the bss section before entering main. You can actually see it when disassembling:

This is just an arbitrary example:

>avr-objdump -d -S main.bin >main.lss

000017fa <__do_clear_bss>:
    17fa:   20 e0          ldi   r18, 0x00   ; 0
    17fc:   a0 e6          ldi   r26, 0x60   ; 96
    17fe:   b0 e0          ldi   r27, 0x00   ; 0
    1800:   01 c0          rjmp   .+2         ; 0x1804 <.do_clear_bss_start>

00001802 <.do_clear_bss_loop>:
    1802:   1d 92          st   X+, r1

00001804 <.do_clear_bss_start>:
    1804:   ac 38          cpi   r26, 0x8C   ; 140
    1806:   b2 07          cpc   r27, r18
    1808:   e1 f7          brne   .-8         ; 0x1802 <.do_clear_bss_loop>

Re: Does usbPoll() get executed before entry to the ISR?

$
0
0
It can be a good idea to simulate a device disconnect after program start to force a bus reset. This removes all ambiguity after startup.

 usbDeviceDisconnect();  /* do this while interrupts are disabled */
 _delay_ms(500); 
  usbDeviceConnect();


Otherwise you should be more clear about what you actually want to accomplish with your code. Is there an actual issue or is this a general question?

Re: static uchar usbIsReset; /* = 0; USB bus is in reset p

Re: Minimal USB implementation

$
0
0
I tried inlining the crc routine. Unfortunately it only saved two bytes.

Re: Does usbPoll() get executed before entry to the ISR?

$
0
0
Well, it's really a pure theoretical question, but with a view to implement the data adquisition part of the program in hardware: bit reading and stuffing. This would let slow or old fashioned microprocessors to interface USB. My knowledge of USB started with the study of this program, which has led to understand the basics of the USB 1.1 specification. But now I see I would need at least 11 * 8 = 88-bit shift registers which kind of forces to use FPGA, and FPGA seems not to be do-it-your-self stuff. Now I see that, taking into account the high clock rates and large memory space of modern microcontrollers, a 2K software controller like the one object of this subforum is feasible (Christian's program of 2004 is 2KB long).

On the other hand, the Circuit Cellar project is up and running. It is just a MAX517 used as a programmable power source, programmble form a PC via USB and is up and running, save that I dispensed with the MAX517 and have a 33-ICs Z80 system reading the data sent by the device (all of them TTL small scale integration save RAM, ROM and CPU).

Anyways, useless as it is that knowledge in a ready-to-use world, I am quickly advancing in the comprehension of Christian's driver. To really understand it, I would need to make a state diagram of the program. And for this, a precise knowing of timing, fundamentally idle time between packages and the reset thing, is imperative.

The application program, main function is:
int main(void)
{
  DDRB = 0x22;   // 0010 0010 PB1=SDA and PB5=SCL are output
  PORTB = 0x22;   //SDA=SCL=1

  usbInit();
  sei();
  for(;;){      // main event loop
       usbPoll();
     }
  return 0;
}

As you know, usbInit() unmasks INT0 interrupts ans sei() enables interrupts globally. When power is applied, let it be time t0, the ATtiny85 uC @12MHz is quickly running ready to accept interruptions. Whereas the host will spend in the order of hundreds of ms, counting from t0, to issue the reset signal. So I think usbPoll() will have a very pretty choice of executing all through before the interrupt service routine is entered. But that is not all. In usbdrv.c (2004 version, 12MHz clock), we have:
static inline uchar   isNotSE0(void)
{
uchar   rval;
/* We want to do
 *     return (USBIN & USBMASK);
 * here, but the compiler does int-expansion acrobatics.
 * We can avoid this by assigning to a char-sized variable.
 */
   rval = USBIN & USBMASK;
   return rval;
}


and, in its usbPoll function:
if(isNotSE0()){ /* SE0 state */
                usbIsReset = 0;
        }else{
                /* check whether SE0 lasts for more than 2.5us (3.75 bit times)
                if(!usbIsReset){
                        uchar i;
                        for(i=100;i;i--){
                                if(isNotSE0())
                                        goto notUsbReset;
                        }
                        usbIsReset = 1;
                        usbDeviceId = 0;
                        usbNewDeviceId = 0;
notUsbReset:;
                }
        }


This code makes shure to debounce the reset signal after attach and usbDeviceId and usbNewDeviceId get zeroed before entering the ISR, though as we discussed and another thread, their values are zero at this time as a result of the BBS section been zero at runtime. Does this line of reasoning seem plausible?
Viewing all 4524 articles
Browse latest View live