In these talks, we will first look at flat connections with compact structure groups: their Kahler structure, relations to Yang-Mills connections, the corresponding representation varieties, relations to holomorphic structures, the corresponding Morse stratifications etc. Then we will look at flat connections with complex structure groups: Hitchin equations, hyperKahler structure, perfect Morse function etc.