Hello and welcome to Tom's Hardware Forums.
Go back to 8Gb and check in the BIOS for a setting that may allow you to upgrade. I Googled and this http://gdgt.com/hp/pavilion/6540y/specs/ doesn't mention scaling up to 16Gb - from where does your information come?
HP spec sheet that came with computer