Chris has put up a quick comparison between the D40 and the D80 over on his blog. You can read the entry at http://www.christalbot.co.uk/?p=77
His MB-D80 came today so he's included some basic info about this. I've also arranged to borrow his D80+MB-D80 sometime next week so I can add it to my D2X/D200+MB-D200 comparison.
There are a few things that I'd like to point out:
The EOS-400D is Canon's low-end DSLR, but it's aimed more at the D80 market. I believe that Nikon are currently selling one of the cheapest DSLRs going, the D40.
Canon changed their lens mount from EF (I guess?) to EF-S, which in many ways is similar to the AF-S F-mount glass we see over in the Nikon world. Specifically all Canon glass made in the last n years has a built in motor. I think. But this should mean that there is very little practical difference between AF speed on Canon and Nikkor glass at a given price range. I wouldn't be surprised if the Canon L glass AF speed was better than the Nikkor offering, given that they've been doing it longer. Again, I think. I can't claim to know more than the very basics about the Canon line-up or recent history. If I've got it wrong, add a comment.
These days it would be crazy to buy the D40 over the D40X (10MP with better high ISO, etc. instead of 6MP). Given the price difference between the D40X and the D80... I'd argue that those people are also crazy not to buy the D80. But it is definitely horses for courses, and if you want a compact, cheap yet powerful DSLR, the D40(X) is the way to go.