Spain sucks, believe me, I live here, damn!!!.
(But not for long).
my parents have bought a house in spain, near alicante. (that's near barcelona). its not built yet though.
if you want cheap accomodation look for a youth hostel or bring a tent.
there are several cheap camp sites in the middle of the city you can probably find details on the internet but you will then have to take tents with you
I went to Barcelona for 5 days last summer. Its a really nice place.
We stayed in a hotel near the main station (the hotel was called Hotel Abba Sants - might be a bit expensive for what you're looking for). There are loads of places about though - the tube system there is really simple and easy to use - there are only 5 lines but they go right out to the suburbs, so don't worry if you end up on the outskirts. Worth noting the times of the last trains though otherwise you might end up getting a taxi.
The city itself is quite a safe place - make sure though that you avoid the Gothic and Chinese quarters after dark - there are lots of little dark alleyways and thats where most of the crime happens. Les Rambles is a full of restaurants and shops, and theres also 'La diagonal' which is a huge long road where all the posh shops are (and at the bottom there's a really good shopping centre - but don't attempt to walk all the way along the diagonal - its a very, very long walk!).
Its worth taking one of the tour buses - there are 2 routes and you just buy a ticket and can get on and off wherever you like and even change between the 2 routes etc when you like. Its worth it to get to see all the bits like the Olympic village, some of Gaudi's work thats dotted about the city and loads of other stuff too.
If theres anything else you want to know, you;re welcome to ask!