Montjuic Castle is at the top of a 17th century hill. The view from the castle is amazing, and it is free to visit. Although you either need to pay to take the cable car to the top, or prepare yourself for a long uphill walk!
One of the courtyards at Krakow Castle (Wawel Castle). This is almost the only photograph that I managed to take of the castle since they would not let me shoot anywhere inside the buildings (and my camera does not even have a flash!). While the castle was interesting, it felt like the last outpost of communism. Everything was regulated as to where you can go, when you can go, how long you could be there etc. It was not the most tourist-friendly experience that I have ever had.