Character actor Edgar Buchanan, 76, who appeared in dozens of westerns and played the cantankerous Uncle Joe on television's "Petticoat Junction," died Wednesday at Eisenhower Memorial Hospital.

He recently had undergone brain surgery and had been comatose for six weeks. He died as a result of the prolonged coma, complicated by pneumonia and a stroke, a hospital spokesman said.

Mr. Buchanan, usually cast as a likable rogue, appeared in more than 80 movies, including many westerns, and in 150 television dramas before landing the role of Uncle Joe in the "Petticoat Junction" series on CBS-TV in the 1960s.

Born in Humansville, Mo., the son of a dentist, he enrolled at the University of Oregon in Eugene and took premedical and drama courses.

At the urging of his father, he went on to North Pacific Dental College in Portland, where he met and married classmate Mildred Spence. He practice dentistry in Eugene for 10 years while also working as assistant to the local university's drama coach. Then he moved closer to Hollywood by opening an office in suburban Altadena.

He became involved in the Pasadena Playhouse, and was in his 11th production when a Hollywood movie scout took notice. That contact launched his movie carrer with a role in "Arizona."

The dental work didn't end there. Mr. Buchanan was hired to play veterinarian Dr. Samuels - stepfather to outlaws Frank and Jesse James - in the move "The Great Missouri Raid." When actor Macdonald Carey broke a tooth in a fight scene, Mr. Buchanan contrived a temporary cap that allowed Carey to continue work.

Among Mr. Buchanan's other films were "When the Daltons Rode," "Escape to Glory", "Texas," "The desperadoes," "Buffalo Bill" and "Coroner Creek."

He was also a regular on "Cadehs County," a CBS-TV television series that was broadcast for a year in the early 1970s, in which he played Deputy J. J. Jackson to Glenn Ford's Sheriff Sacm Cade.

He is survived by his wife of 51 years, Mildred, and a son, Buck. CAPTION: Picture, EDGAR BUCHANAN